473,320 Members | 2,012 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 quesion

Hi group,

In a stylesheet I saw the next:

#menu ul {
width: 154px;
\width: 156px;
w\idth: 154px;
}

What is the difference between them and why is "\width" 2px more? Has it
something to do with browser differences?

Tnx!
Koen
Nov 5 '05 #1
5 1247
Koen <ko**@nospam.com> wrote:
In a stylesheet I saw the next:

#menu ul {
width: 154px;
\width: 156px;
w\idth: 154px;
}

What is the difference between them and why is "\width" 2px more? Has it
something to do with browser differences?


http://centricle.com/ref/css/filters/

--
Spartanicus
Nov 5 '05 #2
On Sat, 05 Nov 2005 02:26:53 +0100, Koen wrote:
Hi group,

In a stylesheet I saw the next:

#menu ul {
width: 154px;
\width: 156px;
w\idth: 154px;
}

What is the difference between them and why is "\width" 2px more? Has it
something to do with browser differences?

Tnx!
Koen

Lo Koen,

This is indeed a hack to make sure different browsers (with all
their different CSS-interpretations) end up looking the same.

Perhaps off-topic but this kind of hack is not the prettiest if you ask
me. Look for information about the "Box Model Hack" to read up on the many
different solutions out there.

FWIW my personal favorite is the voice-family variant (see example)
because of it's cleanless.

/* Box Model Hack for IE5.x browsers */
#topicnav ul li a {^
margin-right: 10px; /* only IE5.x browsers will use this */
voice-family: "\"}\"";
voice-family: inherit;
margin-right: -5px; /* other browsers will use this */
}
HTH,

SomeDude

Nov 6 '05 #3
SomeDude wrote:
On Sat, 05 Nov 2005 02:26:53 +0100, Koen wrote:

Hi group,

In a stylesheet I saw the next:

#menu ul {
width: 154px;
\width: 156px;
w\idth: 154px;
}

What is the difference between them and why is "\width" 2px more? Has it
something to do with browser differences?

Tnx!
Koen


Lo Koen,

This is indeed a hack to make sure different browsers (with all
their different CSS-interpretations) end up looking the same.

Perhaps off-topic but this kind of hack is not the prettiest if you ask
me. Look for information about the "Box Model Hack" to read up on the many
different solutions out there.

FWIW my personal favorite is the voice-family variant (see example)
because of it's cleanless.

/* Box Model Hack for IE5.x browsers */
#topicnav ul li a {^
margin-right: 10px; /* only IE5.x browsers will use this */
voice-family: "\"}\"";
voice-family: inherit;
margin-right: -5px; /* other browsers will use this */
}
HTH,

SomeDude


Thanks for the replies, and I thought with the comming of css there will
finaly some consistancy between browsers, some kind of a norm. Not. If
everybody would use Firefox our live would be much easier :-)
Thanks for the voice-family tip, I check it out.

Koen
Nov 7 '05 #4
>
Thanks for the replies, and I thought with the comming of css there
will finaly some consistancy between browsers, some kind of a norm.
Not. If everybody would use Firefox our live would be much easier :-)
Thanks for the voice-family tip, I check it out.


Make that Opera and I would agree with you!
--
Chris Hughes
"Reality is that which, when you cease to believe, continues to exist."
http://www.epicure.demon.co.uk
Nov 7 '05 #5
On Mon, 7 Nov 2005 11:04:10 +0000, Chris Hughes
<ch**********@epicure.demon.co.uk> wrote:

Thanks for the replies, and I thought with the comming of css there
will finaly some consistancy between browsers, some kind of a norm.
There is, as far as browsers are concerned. It's just a certain
operating-system component that causes most of the trouble.
Not. If everybody would use Firefox our live would be much easier :-)
Thanks for the voice-family tip, I check it out.


Make that Opera and I would agree with you!


Actually, I think "anything except IE" would be good enough.

From what I've seen of stats recently, I think we are getting close to
the stage where IE 5 can be ignored as far as cosmetics are concerned -
a readable page is enough.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Nov 7 '05 #6

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

Similar topics

1
by: Matthew K Jensen | last post by:
I've been trying to find a way to detect when a command run by os.popen (or similar) has completed (in Windows, btw). I found such a function (i don't remember the exact name and library), but the...
17
by: laniik | last post by:
Hi. I have a simple question, but I couldnt find the answer in any literature online. i have a base class A, that has some functions. now, my understanding of virtual functions means that in:...
1
by: ion | last post by:
My application is a 2 tier design (client and db server) however I split it up into 3 components: UI layer, business layer and data access layer. My question is regarding how the UI interacts...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.