How to give fixed length of DIV in Firefox.

July 2, 2009 at 02:49:16
Specs: Windows XP, 1 GH / 256 MB
Hi, Guys!

I want to adjust a fixed width of a <DIV> in
CSS. So when I give width:800px; in
Internet Explore then it works and when I write
same code in Firefox, it does not work and not
adjust a fixed width.

You can see the code eaxmple here:

CSS Code

HTML code
<div id="body"></div>

So 800 px width automatically fix in IE but not
in FF, So how can I fix a width of DIV in


Qasim Ali.

See More: How to give fixed length of DIV in Firefox.

Report •

July 2, 2009 at 03:52:04
Not sure why, but I wouldn't use "body" as ID name.

Try to use "wrapper" or "page" instead.

If it doesn't work, maybe other code in the HTML or CSS created the problem.


Report •

July 2, 2009 at 11:53:14
Hi, Laler!

I tried other names as well in place of body (as an ID) but do
not work. Now what can be the problem?

You will have seen in many sites like and that their <DIV> make same layout in all
Browsers. But I don't know how?


Qasim Ali.

Report •

Related Solutions

Ask Question