CSS Width Problem.

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Feb 2007
Posts: 11
Reputation: killer007 is an unknown quantity at this point 
Solved Threads: 0
killer007 killer007 is offline Offline
Newbie Poster

CSS Width Problem.

 
0
  #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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,210
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 165
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: CSS Width Problem.

 
0
  #2
Jan 7th, 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 Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



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


Views: 1614 | Replies: 1
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC