Old 28-01-2006, 05:01   #1 (permalink)
thomaz
caught a lite sneeze
 
thomaz's Avatar
 
Join Date: Nov 2003
Location: Sweden
Posts: 62
IE vs. Firefox CSS

Ok ... why does IE place everything one pixel more to the left than Firefox does? Just two divs with left and right float inside another div that is placed in the center of the page. In Firefox the divs are correctly placed, but IE displaces the two divs one pixel to the left, making everything ugly!

I've been trying to find a solution but nothing seems to work. Is there a way to work around this problem?

Hoping for good answers
  Reply With Quote
Old 28-01-2006, 05:17   #2 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,200
link?
  Reply With Quote
Old 28-01-2006, 05:25   #3 (permalink)
thomaz
caught a lite sneeze
 
thomaz's Avatar
 
Join Date: Nov 2003
Location: Sweden
Posts: 62
I put the page up temporarily at http://thomaz.50webs.com/divvo.html

If you view it in FF, it looks as it should, but in IE it-s misplaced one pixel to the left.

(Btw, don't mention the design ... I only did this so you could see what I mean)

Last edited by thomaz : 28-01-2006 at 06:00.
  Reply With Quote
Old 28-01-2006, 09:56   #4 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
I'm not sure. Try adding margins to fill out the width of ".rap" see what happens. Also, in the future don't use classes for big layout sections - use ids.

If nothing else, send IE its own stylesheet with padding-left: 1px; on ".rap". Sometimes it's required.
  Reply With Quote
Old 28-01-2006, 10:01   #5 (permalink)
thomaz
caught a lite sneeze
 
thomaz's Avatar
 
Join Date: Nov 2003
Location: Sweden
Posts: 62
Ok ... how do I specify an own stylesheet for IE!?
  Reply With Quote
Old 28-01-2006, 11:41   #6 (permalink)
thomaz
caught a lite sneeze
 
thomaz's Avatar
 
Join Date: Nov 2003
Location: Sweden
Posts: 62
I think I solved it by doing this:

.rap {
width: 560px;
padding-left: 1px;
margin: 0px auto 0px;
color: #2B2B2B;
}
html>body .rap {
width: 560px;
padding-left: 0px;
margin: 0px auto 0px;
color: #2B2B2B;
}

I won't read the second .rap ...
  Reply With Quote
Old 28-01-2006, 13:55   #7 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,200
I can't see any difference tbh.
  Reply With Quote
Old 28-01-2006, 16:13   #8 (permalink)
thomaz
caught a lite sneeze
 
thomaz's Avatar
 
Join Date: Nov 2003
Location: Sweden
Posts: 62
I didn't use it on the page I linked here .... I used it on another site
  Reply With Quote
Reply



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

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8