Troy III 272 Posting Pro

Here, - catch this:

function disableRefresh(netscape){
	var F5=(netscape||event).keyCode;
		if(F5==116){
			if(!netscape){event.keyCode=0}
			return false;
			}
	}
document.onkeydown=document.onkeypress=disableRefresh;
//IE, FX, OP, ++ Troy III

p.s.: adding 100KB of JS code for a simple task is pretty much expensive; Especially when you are forced to include all of that junk just to be able to expand your script functionality to another less than 35% of existing browsers.
I personally hate pages forcing me to download 100KB++ so I could see some silly rollover effect.

Troy III 272 Posting Pro

Did some tests and seems all the HTML5 tags / features work pretty well across all modern browsers except in IE6 for whom you have to use a little JS to make it style specific HTML5 elements.

It's easy but still takes quite some time to shape your skills / remember all the tags, etc.. I think I will not adopt it so soon in any foreseeable future as I have yet to discover any substantial benefits it offers.

It's disrupting.

Well, of course not!

Troy III 272 Posting Pro

...............
sh. this thread is oldddd....

Troy III 272 Posting Pro

Doc-type has absolutely nothing to do with SEO!
You have to understand that DTD, - specified or omitted - can't affect SEs in any possible way; As web designers - we don't, and we cant optimize search engines, - SEO engineers do that!!!

Your doc-type, type of thing is completely irrelevant piece of junk when it comes to SE performance and efficiency, and while at it, -has no effect at all.

When it comes to accessibility;
Accessibility regulations are completely out of DTD scope, and there is no DTA(ccessible) Definition defined up to this day, and there wont be one in the future either. Because it is done within the code, and considering less than few existing accessibility features provided by actual html standard, it completely depends on the designers intellect and awareness; like when implementing nested menus; image based texts; links with no description; unnecessary image objects instead of background images as means to form their design etc,. which are all nothing but spoilers of the core reason, that the page was actually designed for - which is its content - its availability and accessibility by everyone, including blind deaf ill and in any other way, incapable people.

DTD tells your browser in what W3C mode to render your page- nothing else. And that's completely irrelevant to any other party except for W3C web development hegemony and dictatorship.

Troy III 272 Posting Pro

:') no not even then lady skunk, not even then. :'D

Troy III 272 Posting Pro

Sorry, but css: vertical-align has no effect on divs, -therefore ...

Troy III 272 Posting Pro

I have a table inside a div with height=100%(viewport). The also table has height=100%(viewport). However, I want one row to have a fixed height while other adjusts to the content.

<div style="height:100%;">
<table style="height:100%">
<tr style="height:10px;"><td>Header</td></tr>
<tr style="height:100%;"><td>Header</td></tr>
</table>
</div>

The problem is that the second tr also takes viewport (100%) size. Thus I have a table that has a height of is 10px + viewport size. This is not what I want. Internet explorer seems to screw this up for some unknown reason. How do I make so that this work in internet explorer.

No -Explorer is acting as expected and as it normally should.
It doesn't have the "bleeding content" bug you are rellying on to get your layout idea into practice here.
The content should never bleed out of the table cell which is a container and containers should always be able to contain things. Thats their sole pupose.

You are using tables - than use table conventional methods to manage you content, don't use hacks. It's a bad coding practice.
Read about rowspan and collspan starting here, or get yourself a WYSIWYG - table editor for a fast solution.

p.s.: and you shouldn't use no pupose divs to wrap tables - tables are themselves block elements, you've also stated div 100% table 100% but 100% of what?!

Troy III 272 Posting Pro

Who tole you that rubbish? Search Engines go into Quirks Mode and I am willing to bet you on that. Obviously you no nothing of coding. I've been a web developer for 9 years how long have you...? Google it if you don't believe me. Also whats your problem?

Well sun, I don't mean to argue with you by stating that I code since summer 1996, but since you've asked, you do the math.

Let Search Engines go into text only-mode if you like, that's even better for you, since it would only speed things up, -but that has nothing to do with our concern here and our main concern is our client, clients!

The only thing that matters is the welllformed structure under the <html> opener until it is closed - everything else is an overhead and a potentially higher chance of causing a mess.

Rergards.

Troy III 272 Posting Pro

I'm simply letting him know that its bad for your web site thats all. No Doctype will make search engines go into "Quirks Mode" which will effect the site in general. I'm NOT insisting he uses it I am giving him some friendly advice to help him and his web site out.

Why, do you think I am wrong giving him some advice...?

Because you are wrong!
"make search engines go into "Quirks Mode" "
Search engines dont go into any kind of mode, and even if they do, who cares?!
And what's so notoriuosele bad about "quirks mode?
[It gives you more coding options than W3C ever will = qiurks means FREEDOM]

I've asked you that;
Because: html doesn't need any of what you are demanding - the Document Extension will suffice!
I remember the time when you were not allowed to write anything ( meaning nothing ) before the <HTML> tag, 'cause it would cause errors on the parser, or render as unformated as if it was a part of your page content, but more often confuse early days Servers sending a bunch of uninteligibile crap to your clients.

Watch this:
this is Google!

<!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title><script>window.google={kEI:"3UH4Ssy6Np-TjAfZx6iuDg",kEXPI:"
....

and this is Google /Firefox

<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Mozilla Firefox Start Page</title><style>body,td,a,p,.h{font-family:arial...

this is firefox official

<!DOCTYPE HTML>
<html xml:lang="en-US" lang="en-US" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Mozilla | Firefox web browser &amp; Thunderbird …
Troy III 272 Posting Pro

If you are targeting Explorer only
you can always use a super lightwieght DSO to access data
go to MSDN and search for "Data Source Object" you'll find all that you need.

Troy III 272 Posting Pro

he needs to vertically align in the middle,
as I already mentioned with his actual code structure and his existing styles it can be fixed by simply removing the DIV wrapping his Image in TD elements, nothing else.
But, new comers never bother to come back and tell if some advice helped solve their problem or god forbid mark the thread solved.

Troy III 272 Posting Pro

try alerting "i" at the end of the loop and tell us what's the value of it
if it is 110 as opposed to 62 items displayed your loop is skipping - pre counting during if(st=='') conditional.

Troy III 272 Posting Pro

This can make it 333

Test this code in your addresbar:

javascript: alert(333.33333.toFixed())

implement it if you like it.

You can also do things like:
3215.3248566432.toFixed() //gives you [3215]
3215.3248566432.toFixed(1) //gives you [3215.3]
3215.3248566432.toFixed(3) //gives you [3215.325]
3215.3248566432.toFixed(4) //gives you [3215.3249]

etc

Troy III 272 Posting Pro

Do you realise that if you don't use DOCTYPE's its bad for your website...?

Do you mind if I ask why you don't want to use them...?

Do you mind if I ask you:
Why do you Insist on him that he should use them anyway???

Troy III 272 Posting Pro

Sorry for asking but
Are you sure you understand his question?

Troy III 272 Posting Pro

Hello unthankfull.
- Why don't you mark the thread "solved"?
p.s.:
(by the way: Its something that we all can see, right from your site!)

Troy III 272 Posting Pro

you should mark "this thread solved" than.

Troy III 272 Posting Pro

is not exactly like that, more like:
<a href="" onfocus="some_function">link1</a>
the only problem with this is that onfocus occurs when onclick(when you click) occurs, you usualy use onfocus when you are using <input type=text> or something similar

No..., its exactly like that.
Inline scripts are, 'a bad coding practice' everybody agrees upon. Me to.
The onfocus event gets fired when element receives focus. That's all you need to know. And there are many ways to send focus to element. You can even do it by script.
ie someLink.focus() will suffice.

Link focus is implemented for accessibility reasons and especially for keyboard navigation ability.

Troy III 272 Posting Pro

Hi
I am using Expression Web 2 and need to alter an existing website so as to display nicely on what I regard as a standard display size of 1024 x 768. It would have been better to start from scratch but it's a bit late for that now. I have an error "td tag not closed before this body tag closed". I couldn't find any open tags and decided to sumbit the page to the HTML validator. To cut a long story short it didn't accept the Doctype statement throwing 9 errors.

Just out of curiousity I decided to enter www.microsoft.com into the validator. Is this a record? The validator threw up 296 errors and 31 warnings!

Microsoft seem to be doing all right so why bother should we bother with the HTML validator?

Geoff

The HTML online validator can't tell where the arror ocurred exactly. Tries to narrow the posibility by selecting the first element the error triggered and the last one suffering it. In this case, the closing tag of the body element. This means that the error has safetly passed from element to another without causing a chain error reaction until it reached the end of the document. Therefore logically you should look from the head-tail direction to try and trace it. In fact it is most probably nothing, not even a missing closing tag, It migt be some mismatched quote or accidentaly deleted or forgoten qoute in some value most probably at …

ggeoff commented: A very useful post +3
Troy III 272 Posting Pro

Since years now, html element is a part of the document layout. You are seing the gap padding of the html now

you dont need the * selctor of course, its tricky and will cause much trouble as you develop further, jus try to add to it display: block and see what happens with fx sf and op render ...

the proper way to remove that padding safetly in all browsers is to use html, body{...} selector.

Troy III 272 Posting Pro

The document flow must always follow the visual flow therefore the obvious is to order the alements according to that flow...

HTML:

<div id="header">
<img class="logo" src="image/dcfc_logo.jpg" alt="DCFC Logo" width="120" height="120" /> 
        <h1>Derby County Football Club</h1>
        <h2>Index Page</h2>
      </div>

Therefore (for it to Function) you should make (the hilighted) adequate change to your stuctural code too. You should remove that "position:relative" if you Iike to preserve the integrity of your boxes too! Thought you knew that - and don't forget to remove the right alignement of your headers also, - it looks better left-aligned, right by the image logo, to my taste ofcourse.
Regards

Troy III 272 Posting Pro

hi guys, just want to ask if it is possible to check which link on the page receives a focus? For example, i got Links name A1, A2, A3, A4 and A5. How to check which link is currently receiving the focus? is it possible to do? thanks ...

someLink.onfocus=doYourThing

Where "doYourThing" is the function you want to invoke when that paricular link has recieved focus.

Troy III 272 Posting Pro

float the image to the left
css: .logo {float:left}

Troy III 272 Posting Pro

so what?

Troy III 272 Posting Pro

You'll need a server side solution for this,
try this link for a start
http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=189

Troy III 272 Posting Pro

don't worry they want!
you've coded for firefox and firefox it gave.

there are two ways of fixing this, you either give your images enough space (width) to fit in that container, or you force style display block on their inline wraper tags, <a> .

I would suggest you go with : td a{display:block} !in your frame document source Style, which is at:
http://cavpollos.webs.com/iFramePages/cuadrosLinks.htm

Troy III 272 Posting Pro

The "valign" property does not propagate from the parent to its children children!

Try testing that scenario of yours with static HTML first.
This way you can see where lies the problem.

But from where we are the problem is: the image nested in the div element.
The td valign is pointing to the div element not to the image, so the image will not be valigned because the hosting div is not required to do that with its own children too.

But in any case, the DIVs can't make your inline elements to render vertically aligned in the middle.

Also if you ask me, that DIV is not required and shouldn't be there at first place at all. Remove the div and asign its class to your image instead. >>Keep your HTML code clean.

Troy III 272 Posting Pro

could it be the other way around, because if it really happens to be an IE "bug" you should post back at Microsoft -'cause we cant fix browsers.

Why don't you check you code instead of 'repoting bugs' you don't know anything about?

It works fine on my IE 6 - but you should check back the style, (and a bit of positioning) because the border around elements is dashed here while in fx it's solid.

Troy III 272 Posting Pro

of course, thats because your border doesn't have a color for you to see it, you sould set the bordercolor also. Or assign a previously defined class instead. it keeps things cleaner.

Troy III 272 Posting Pro

As usual, develop something in FF and as soon as you get near IE everything decides to pack up and go home.

I'm getting an object expected error, forgive me if it's simple, I'm new to JavaScript.

HTML Code

<div id="tabsCon" class="tabsContainer">
<span id="tab1" class="activeTab" onclick="javascript:changeTab('tab1');">Tab 1</span>
<span id="tab2" class="inactiveTab" onclick="javascript:changeTab('tab2');">Tab 2</span>
<span id="tab3" class="inactiveTab" onclick="javascript:changeTab('tab3');">Tab 3</span>
<span id="tab4" class="inactiveTab" onclick="javascript:changeTab('tab4');">Tab 4</span>
<span id="tab5" class="inactiveTab" onclick="javascript:changeTab('tab5');">Tab 5</span>
<span id="tab6" class="inactiveTab" onclick="javascript:changeTab('tab6');">Tab 6</span>
</div>

JavaScript

function changeTab(tab){
	tabCont = document.getElementById('tabsCon');
	items = tabCont.getElementsByTagName('span');
	var len = items.length;
	for (i=1;i<=len;i++){
		if (document.getElementById('tab'+i).getAttribute('class') ==  "activeTab" || document.getElementById('tab'+i).getAttribute('className' ==  "activeTab")
			document.getElementById('tab'+i).setAttribute("class", "inactiveTab");
			document.getElementById('tab'+i).setAttribute("className", "inactiveTab");
		}
	obj2 = document.getElementById(tab);
	obj2.setAttribute("class", "activeTab");
	obj2.setAttribute("className", "activeTab");
	http.open('get', page+'?task=changeTab&tab='+tab);
       http.onreadystatechange = handleResponse;
       http.send(null);
	}

There is obviously more to the .js file but I've included what matters.
As I say, it's all working in firefox, any help would be greatly appreciated.

You are kidding, right?!
No matter what broswer you test this on, will not work at all.
Although invisible to novice attention. What 'explorer'?! It contains errors, javascript errors, therefore your statement is false. It shall faill in fx and any other browser.
But this code should not:

function changeTab(tab){
	var tabCont = document.getElementById('tabsCon');
	var items = tabCont.getElementsByTagName('span');
	var len = items.length;
	for (i=1;i<=len;i++){
  if (document.getElementById('tab'+i).getAttribute('class') == "activeTab" || document.getElementById('tab'+i).getAttribute('className' ==  "activeTab")){
	document.getElementById('tab'+i).setAttribute("class", "inactiveTab");
	document.getElementById('tab'+i).setAttribute("className", "inactiveTab") }
	}
	var	obj2 = document.getElementById(tab);
		obj2.setAttribute("class", "activeTab");
		obj2.setAttribute("className", "activeTab");
/*		http.open('get', page+'?task=changeTab&tab='+tab);
		http.onreadystatechange = handleResponse;
		http.send(null);
*/	}

[! I've isolated last lines of code because its externaly …

Troy III 272 Posting Pro

Expired or Illegal copy perhaps?!
"Sorry, the Windows 7 RC is no longer available for download. The general release version of Windows 7 will be available on October 22, 2009."

Troy III 272 Posting Pro

i use a server-side script, when i logout i redirect to a page that autoredirects to the login page, then if i hit back i'll get redirected to the page that autoredirects to the login and so on (ad infinitum if i keep hitting back).

Hey there!
You sholuld use:
location.replace("http://yourRedirPage.ext");
instead - and congrats! :')
- you're done!

Troy III 272 Posting Pro

can you do so the upload thing disapear

Yes, you simply delete it!

and it play from a file uploaded to my website?

Just change the play button code from: <INPUT TYPE="BUTTON" VALUE="Play" OnClick="Player.controls.play()"> into: <INPUT TYPE="BUTTON" VALUE="Play" OnClick="Player.URL='http://mywebsite.dk/music/mymusic.mp3'>

Troy III 272 Posting Pro

This is interesting ....[?!?] still haven't found anything working for you on internet?!

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Windows Media Player</title>
	<style type="text/css">
	#Player,
	input{width:400px;}
	p input{width:97px}
	</style>
</head>
<body>
<INPUT TYPE="File"   VALUE="Megamix.mp3"	onChange="Player.URL = this.value">
<p>
<INPUT TYPE="BUTTON" VALUE="Play"		OnClick="Player.controls.play()">
<INPUT TYPE="BUTTON" VALUE="Stop"		OnClick="Player.controls.stop()">
<INPUT TYPE="BUTTON" VALUE="Pause"		OnClick="Player.controls.pause()">
<INPUT TYPE="BUTTON" VALUE="Full Screen"	OnClick="if (Player.playState == 3) 
Player.fullScreen = 'true'">
</p>
<p></p>

    <SCRIPT type="text/javascript">
      if(-1 != navigator.userAgent.indexOf("MSIE"))
      {
        document.write('<OBJECT id="Player"');
        document.write(' classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"');
        document.write(' width=300 height=200></OBJECT>');
      }
      else if(-1 != navigator.userAgent.indexOf("Firefox"))
      {
        document.write('<OBJECT id="Player"'); 
        document.write(' type="application/x-ms-wmp"'); 
        document.write(' width=300 height=200></OBJECT>');
      }    
    </SCRIPT>
</body>
</html>
Troy III 272 Posting Pro

When i am using below code? Page
<td class="itTD" nowrap="nowrap" width="90%" style="padding-right: 0px">

Do it the Standard way - and don't pay attention to kids making jokes on you with white-space: normal.


If you really demand that the text in those TD elements does not wrap and brak in a new line as this code... (

<td class="itTD" nowrap="nowrap" width="90%" style="padding-right: 0px">

)... instructs the quirks mode browsers to do, -
you should correct that into this:

<td class="itTD" style="width:90%; [B]white-space:nowrap;[/B] padding-right: 0px">

That's all!

Troy III 272 Posting Pro

in my web server all pages i develop targeting internet explorer browser but other browser can open it but not view properly.therefore i need to forcefully open it in internet explorer.if user open it in other browser than IE it gives a message box saying "The site is best viewed using Microsoft Internet Explorer version 5 or above" and site is open in that browser.But i need to redirect the site to IE browser and close other browser window.

This is something you shouldn't be able to do!
The one and the best way to handle this situation - is to tell the client that his UA is not capable of rendering those pages correctly or that will fail to retrieve the requested content completely. And of course instuct them how to access that content.
No aplication should be able to run other appications without user live input and action. Not now, and not in future!

Troy III 272 Posting Pro

Thanks to both ShawnCplus and Troy III. Troy's solution is what I was looking for, but using the object notation as Shawn did is an idea with potential, too.

I guess I used the wrong term when I called it an "anonymous array", but I'm glad you got the idea. I was talking about iterating through a list of strings that could be thrown away as soon as I was done going through the list.

This is the first time I've read the term "garbage collection" in the context of JavaScript. I usually only read it in reference to Java, where the process is incredibly well documented. If I think of the browser as the JavaScript equivalent of Java's "virtual machine", is it basically the same process?

Thank you.

--
-- Ghodmode

No,
it is even better!
:')

That's why you never heard of it before.
This one is automatic and doesn't need coders assistance. There are very rare situations when a coder might begin to notice its leaks or his own misuse of objects and vars etc.

Troy III 272 Posting Pro

Hi! I read that IE 8 accepts child selectors. But it does not seem to work for my IE8 (Spanish version if this even matters).

#div > p{background-color: blue;}
========================
<div id="div">
<p>Shoud work here!</p>
        <div>
                <p>and not here</p>
        </div>
</div>

It works for firefox and not for internet explorer. What could be happening?

What DTD are you using? Might require STRICT mode.
But if you are working in a strict document than it will mean it doesn't support direct child selector syntax.

But this is a highly effective workaround - try this.

<style type="text/css">
            #div p{background-color: blue;}
            #div div p{background-color: transparent;}
	</style>
Troy III 272 Posting Pro

well, you may mark this threat as solved than.

Troy III 272 Posting Pro

I am trying to put up a rope border (border.png) on the sides of my center box of text. Text will work with z-index properly, but the border just will not show. Any ideas?

style.css =

* {margin:0px;padding:0px;top:0px;left:0px;}
body{
	text-align: center;
	background: #000000;
}
#central{
	margin-right: auto;
	margin-left: auto;
	margin-top: 10px;
	position: relative;
	width: 777px;
	text-align: left;
	background-color: #FFFFFF;
}
#contentborderside{
	margin-top: 252px;
	position: absolute;
	width: 800px;
	height:900px;
	background: #FFFFFF url("border.png");
	z-index:1;
}
#content{
	margin-top: 252px;
	position: absolute;
	width: 500px;
	background:#c9a87f;
	z-index:-1;
}

HTML =

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Horseback Adventures</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="central">
	
	<div id="contentborderside">
		<p>There should be a rope on either side of this!</p>
	</div>
		
	<div id="content">
		<h1>Why won't the image show?</h1>
		<p>Try as I might I can't get the z-index to work for my border ='( </p>
		<p>Any ideas?</p>
	</div>

	</div>
</body>

The image is attached.

Thank you!
-optikali

Some little dumb mistake I'm sure...
p.s.: check the little thingy in red inside your code, That's what's missing here.

Troy III 272 Posting Pro

Is it possible to iterate through an anonymous array of strings with a for loop?

Here's what I'm trying to do:

for ( i in ['country', 'city', 'state'] ) {
    doSomethingWithString(i);
}

What I want is the string, but what I'm getting is the index number of the array, which I can't use because the array isn't named.

Thank you.

--
-- Ghodmode

in fact, there is no such thing as anonymous array, this supposedly "arrray" will be garbage collected as soon as the function has passed over.

Therefore you must initiate/create that array before using it at least locally.

for ( i in o = ['country', 'city', 'state'] ){ 
	doSomethingWithString(o[i]);
}

A more readable written form of the same with array value alert:

for ( value in option = ['country', 'city', 'state'] ){ 
	alert( option[ value ] )
}

will serially alert:
country
city
state --- I believe this was what you were looking for.
Cheers.

Troy III 272 Posting Pro

that works if you see my first post above. i have did the same.

but there you will get issue with font-size which will 70% for body from 70% given to HTML

That's why CSS is invented for.
You group select and you divide particulars when needed.
So we will split that body of statements in two groups so we drop properties not needed for html to assign only to element that will need them.

html, body
{
    background-color: #363636;
    color: #FFFFFF;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}
body
{
    font-size: 70%;
    font-family: tahoma,sans-serif;
    line-height: 1.2em;
    text-align: left;
}
Troy III 272 Posting Pro

Tis is the most reliable method when checking for authentic mozilla browser editions.

javascript: if(document.body.style.MozAppearance==""){ alert('mozilla')} //b.b. Troy III p.a.e.

you will get the alert box only if you are rruning one of mozillas editions FX Flok etc.

Or perhaps even better reliability by going this way:

javascript: if("MozAppearance" in document.body.style){ alert('mozilla')} //b.b. Troy III p.a.e.
Troy III 272 Posting Pro

CSS and HTML file is attached in mail.

Plz see attachment

I think that you are not understanding the issue here. For so many years, people, not even knowing the meaning of the word, has been yelling and shouting "standards - standards!" ecessively and for so long that it makes me go throw up out from it.

Now: this is STANDARDS and NOWRAP attribute is not standard -threfore - not allowed in standards compliant browser mode!

Nowrap is a HTML3.2 deprecated attribute not avbailable in HTML4 or XHTML and later.

You should use CSS instead or HTML 3.2 DTD for that to work.

Troy III 272 Posting Pro

actually that is the way it was to start...however, client would like to have different colors based up which menu option is selected. Thus, rather than having different lines of code, only need to change it via the js....hope that was clear.....Can this be done?
thanks for the reply.

no that's not true, you will be forced to have more lines of code if you try that manipulation through javascript, and on top of it all, you will be having to much problems with browsers and moreover this aproach is not reliable. Changing style declarations dynamically will give you more headache than you can think off.
I also don't think that there are clients with such demands, because if your client understands things like these than he must be your coding teacher not your client.

Troy III 272 Posting Pro

Try this:

html, body
{
    background-color: #363636;
    color: #FFFFFF;
    font-family: tahoma,sans-serif;
    font-size: 70%;
    height: 100%;
    line-height: 1.2em;
    margin: 0;
    padding: 0;
    text-align: left;
    width: 100%;
}

[for strict mode!]

Troy III 272 Posting Pro

Hi

I have a page with a bunch of divs set to display:none with 70kb background images. As buttons are clicked the divs are displayed. The background images are specified in an external stylesheet, pc firefox, mac ff, mac safari and every real browser ignors them until the div is set to display:block, awesome. IE7 still loads every single image when loading the site, is there a way around this? Its about 40 images so obv this is effecting load time

Dynamicity is and should remain a javascript responsibility not CSS.
Images should be ready for interaction when page fires onload event no matter if their display property is set to none.

Although some new wannabe FAST browsers are using the cheat you mention and hundreds of others to compensate for their poor performance.

Each and every hardcoded element of the page content is required to be ready for display as soon as you've interacted with it, and every REAL responsible browser should provide it with competence.

The real conventional and traditional solution:
I believe you are using script to handle the display property of those divs and script is what you should use to set their background image property along with their display properties simultaneously.

Troy III 272 Posting Pro

why not simply change the class of the row instead?

Troy III 272 Posting Pro

-what doctype are you using?

Troy III 272 Posting Pro

perfect - thanks!

Thanks for thanks, please mark thread as solved.