Click here to get back home

css parsing order

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
css parsing order julianmlp 05-20-2006
Get Chitika Premium
Posted by julianmlp on May 20, 2006, 8:11 pm
Please log in for more thread options


Is there any difference between this two alternatives?
I mean, does the browser stops parsing after finding "display: none;" ?


Have anyone seen Mozilla source code? It hard to say what happens
either in IE or Opera I guess...

div.whatever_class{
property1
property2
property3
property4
property5
property6
property7
display: none;
}


div.whatever_class{
display: none;
property1
property2
property3
property4
property5
property6
property7

}

regards - julian


Posted by Neredbojias on May 20, 2006, 9:16 pm
Please log in for more thread options


To further the education of mankind, julianmlp@gmail.com vouchsafed:

> Is there any difference between this two alternatives?
> I mean, does the browser stops parsing after finding "display: none;" ?
>
>
> Have anyone seen Mozilla source code? It hard to say what happens
> either in IE or Opera I guess...
>
> div.whatever_class{
> property1
> property2
> property3
> property4
> property5
> property6
> property7
> display: none;
> }
>
>
> div.whatever_class{
> display: none;
> property1
> property2
> property3
> property4
> property5
> property6
> property7
>
> }
>
> regards - julian

It theoretically could depend on what the other properties are, but
basically no difference. -At least that's the theory.

--
Neredbojias
Infinity has its limits.

Posted by Toby Inkster on May 21, 2006, 2:51 am
Please log in for more thread options


julianmlp wrote:

> I mean, does the browser stops parsing after finding "display: none;" ?

No, it doesn't.

> Have anyone seen Mozilla source code?

http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.13/source/mozilla-1.7.13-source.tar.bz2

> It hard to say what happens either in IE or Opera I guess...

It's easy to say what happens with IE and Opera: "no, it doesn't".

If you want proof:

<style type="text/css">
#foo {
        background-color: yellow;
        display: none;
        color: red;
}
</style>

<div id="foo">bar</div>

<script type="text/javascript">
function fooer()
{
        var f = document.getElementById('foo');
        var s = window.getComputedStyle(f);
        window.alert(s.color); // popup window gives hex value for red.
}
window.onload = fooer;
</script>


--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact


Posted by Andy Dingley on May 25, 2006, 6:27 am
Please log in for more thread options


On 20 May 2006 17:11:20 -0700, julianmlp@gmail.com wrote:

>Is there any difference between this two alternatives?
>I mean, does the browser stops parsing after finding "display: none;" ?

I certainly hope not. What happens if the next line is "display:block;"

This behaviour is so wrong-headed that I really doubt _any_ browser has
been tempted by it.

Similar ThreadsPosted
Parsing linefeeds correctly December 1, 2004, 7:53 pm
Best tool to convert html into XHTML for XML parsing? March 17, 2005, 1:15 am
content negotiation and parsing page contents February 6, 2006, 11:43 am
Parsing error in Amaya HTML Editor January 28, 2008, 12:56 pm
Order of buttons? October 6, 2005, 9:37 am
Z order for frames January 14, 2008, 8:55 pm
div presentation order April 28, 2008, 7:28 pm
DIV Tag Not on Top Z-Index Order Problem? March 25, 2005, 3:03 pm
WYSIWYG order forms? November 24, 2007, 2:20 am
Floating DIV positioning. How much does the order matter? December 29, 2005, 7:25 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap