473,320 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

css parsing order

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

May 21 '06 #1
3 1593
To further the education of mankind, ju*******@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.
May 21 '06 #2
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.o...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

May 21 '06 #3
On 20 May 2006 17:11:20 -0700, ju*******@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.
May 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Luis P. Mendes | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I only know a little bit of xml and I'm trying to parse a xml document in order to save its elements in a file (dictionaries inside a list)....
4
by: Pushya | last post by:
Hello - I am trying to parse a .XSD file to obtain information about element name and type in the file. I have been trying to find some kind of documentation for Schema Parsing. All I come...
6
by: BerkshireGuy | last post by:
Does anyone know of a good function that will parse out parts of an SQL statement that is passed to it in seperate variables? It should be able to parse statements that contain ORDERBY, WHERE,...
14
by: Arthur J. O'Dwyer | last post by:
Well, I'm trying to write that program that was requested a few weeks back, the one that could take struct definitions and create portable functions to read and write those structs. Hence the...
5
by: gamehack | last post by:
Hi all, I was thinking about parsing equations but I can't think of any generic approach. Basically I have a struct called math_term which is something like: struct math_term { char sign; int...
29
by: zoltan | last post by:
Hi, The scenario is like this : struct ns_rr { const u_char* rdata; }; The rdata field contains some fields such as :
5
by: Martin Walke | last post by:
Hi all, Can someone help me out here? I'm been using ASP and VBScript for some years but have just ventured into the realms of using server side Javascript and apart from hitting various...
9
by: ankitdesai | last post by:
I would like to parse a couple of tables within an individual player's SHTML page. For example, I would like to get the "Actual Pitching Statistics" and the "Translated Pitching Statistics"...
9
by: Paulers | last post by:
Hello, I have a log file that contains many multi-line messages. What is the best approach to take for extracting data out of each message and populating object properties to be stored in an...
2
by: Terry Olsen | last post by:
I have a very interesting request. A customer receives orders via email. The email contains the shipping address, shipping method, email address and phone number. This information is not all...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.