Computing.Net > Forums > Web Development > How to give fixed length of DIV in Firefox.

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How to give fixed length of DIV in Firefox.

Reply to Message Icon

Name: Qasim Ali
Date: July 2, 2009 at 02:49:16 Pacific
OS: Windows XP
CPU/Ram: 1 GH / 256 MB
Subcategory: General
Comment:

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
#body{
width:800px;
}

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
Firefox?

Regards,

Qasim Ali.
http://qaswallpapers.sitesled.com



Sponsored Link
Ads by Google

Response Number 1
Name: Laler
Date: July 2, 2009 at 03:52:04 Pacific
Reply:

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.

---
Fubar


0

Response Number 2
Name: Qasim Ali
Date: July 2, 2009 at 11:53:14 Pacific
Reply:

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 http://cricinfo.com and
http://bbc.com that their <DIV> make same layout in all
Browsers. But I don't know how?

Regards,

Qasim Ali.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: How to give fixed length of DIV in Firefox.

Question about using CSS. www.computing.net/answers/webdevel/question-about-using-css/4172.html

Random spacing between DIVs in Firefox www.computing.net/answers/webdevel/random-spacing-between-divs-in-firefox/4179.html

Embedded sound loops in Firefox www.computing.net/answers/webdevel/embedded-sound-loops-in-firefox/1279.html