I use this CSS code :
display: block;
width: 250px;
border: 2px solid #feecde;
border-top: 27px solid #feecde;
margin: 10px 0px 0px 0px;
padding: 10px;
font-size: 12px;
line-height: 15px;
With IE6 the width of the block is 250 pixels but with firefox the width is 250 + 10 (padding) + 4 (border).
How can I set the width of this block 250 in IE6 and in Firefox.
Please help !!!!!
Musicscore
CSS problem with block-width
-
- Power Poster
- Posts: 496
- Joined: Wed Jan 25, 2006 11:53 am
-
- Forum Members
- Posts: 80
- Joined: Thu Sep 13, 2007 10:50 am
Re: CSS problem with block-width
Hi There,
Check that you are not using "quirks" mode, this causes IE to use the wrong box model.
Basically check your doctype, it should look something like the below:
Potentially this is quite a deep subject but a sound understanding of the box model is very useful. You can read more here http://www.quirksmode.org/css/quirksmode.html
Post a link if you are still stuck.
Bob
Check that you are not using "quirks" mode, this causes IE to use the wrong box model.
Basically check your doctype, it should look something like the below:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Post a link if you are still stuck.
Bob
-
- Power Poster
- Posts: 496
- Joined: Wed Jan 25, 2006 11:53 am
Re: CSS problem with block-width
I never understood this but YES YES, this is the solution.
Using 'stirct mode' [font=Verdana] [/font] solved my problem.

On the otherhand, got a new problem.
I always used a table with a height of 100%. This gave me a table with filled the who screen.
In strict mode this doesn't seems to work.
Is there a solution for this problem ??
Thanx again.
Musicscore
Using 'stirct mode' [font=Verdana] [/font] solved my problem.



On the otherhand, got a new problem.
I always used a table with a height of 100%. This gave me a table with filled the who screen.
In strict mode this doesn't seems to work.

Is there a solution for this problem ??
Thanx again.
Musicscore
-
- Power Poster
- Posts: 496
- Joined: Wed Jan 25, 2006 11:53 am
Re: CSS problem with block-width (Please Help)
Can someone help me with the described problem.
In strict mode I cann't get the height of my table (screen) 100% of the screen with IE6.
Please help
Musicscore
In strict mode I cann't get the height of my table (screen) 100% of the screen with IE6.
Please help
Musicscore
-
- Forum Members
- Posts: 80
- Joined: Thu Sep 13, 2007 10:50 am
Re: CSS problem with block-width
Hi Musicscore,
Strict mode makes life very difficult, I would recommend transitional mode (as in my previous post) unless you have a very good reason for strict. View the source of some of your favourites websites and the chances are they are using transitional.
I don't use table but I think the below css will help. Make sure your table id=main
Bob
Strict mode makes life very difficult, I would recommend transitional mode (as in my previous post) unless you have a very good reason for strict. View the source of some of your favourites websites and the chances are they are using transitional.
I don't use table but I think the below css will help. Make sure your table id=main
Code: Select all
html, body, table#main {height: 100%}