User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 397,580 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,348 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 691 | Replies: 1
Reply
Join Date: Feb 2007
Posts: 10
Reputation: killer007 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
killer007 killer007 is offline Offline
Newbie Poster

CSS Width Problem.

  #1  
Jan 4th, 2008
Hello Guys i am Facing a problem which is annoying ..

If i use " width=100%; " Site Works Fine on Internet Explorer, But Not on Firefox.
If i use " width=auto; " Site Works Fine in Firefox but not on Internet Explorer.

Can anybody tell me how to fix this or can anybody tell me a way in which we can guess Browser like.

Like if Browser is Firefox then Use stylefox.css.
If Browser is Internet Explorer, then use styleie.css.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Posts: 2,524
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 105
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: CSS Width Problem.

  #2  
Jan 6th, 2008
You didn't tell me how the site fails, or provide a link to the site.

Don't use either of the choices you gave. They are deprecated. Use CSS with

width: 100%;

Remember that IE and FF handle the styles surrounding block objects differently.

When you have a block object with a defined size:

- FF puts the surrounding styles (margin, border, padding) OUTSIDE the defined size.

- IE crams the surrounding styles INSIDE the defined size.

The cure is to not put surrounding styles on block objects of a defined size. Instead, nest two block objects (e.g. divs), one with surrounding styles and the other with the defined size. Nest them in the order you want the measurements to take effect.
Daylight-saving time uses more gasoline
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 5:02 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC