This is a discussion on "Margins in IE are different than Firefox" within the Web Page Design section. This forum, and the thread "Margins in IE are different than Firefox are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Margins in IE are different than Firefox
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Margins in IE are different than Firefox
My personal website I'm having problems with is http://ryakee.freehostia.com/FinalBeta it displays perfectly in Firefox because this is where I tested it. However in Internet Explorer it doesn't display well at all. The latest version has the wrong margins and in other versions of IE the boxes are supposedly not in the correct places. I have cheated in a few places to get a quicker result I fear this may be the problem. http://ryakee.freehostia.com/newdesign.jpg is what I want it to look like. I have read other sites and they suggest another stylesheet but I don't want a new stylesheet for every browser! I Just want my website to look the same in every browser! Any help would be greatly appreciated as I have had this problem in other sites as well and I am aware that it is a common problem but this hasn't helped me in finding answers.
I apologize in advance if this is a bad question or if I waste you time in asking it but I'm desperate to improve. Thanks Very Much! Makkato |
|
|
|
||||
|
Re: Margins in IE are different than Firefox
The problem is that when declaring the width of a box you need to take into consideration the margins, padding and border that you apply to it.
Some browsers (like IE6) exclude the margins, padding and borders in the total width/height of the box. Others counts all those in the border. It's called the box model. And there's a hack of course. The reasoning behind the other stylesheet it's to use for these instances where IE6 differs from the others. They're called conditional comments and you put your IE6 stylesheet in there. Note that what goes in that stylesheet should only be what IE6 needs to see. So ... things like margins, padding, borders and width you put in your regular stylesheet and in the IE6 ones, you just put the width to override the other one. hth |
|
|||
|
Re: Margins in IE are different than Firefox
Thanks for taking time to answer the question. I've read about some of what your saying here http://www.456bereastreet.com/archiv...css_box_model/
for anyone else who is having similar problems. So you would agree that having conditional statements for IE is the solution? I guess I was worried that my code was off. Anyway thanks for your prompt answer! Makkato |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CSS Breaking up in Firefox, unnecessary margins in IE | tox0tes | Web Page Design | 7 | Jun 28th, 2007 12:09 |
| Margins need fixing | notagz1 | Starting Out | 9 | May 28th, 2007 14:03 |
| What's up with margins and padding in IE? | Donny Bahama | Web Page Design | 41 | Apr 19th, 2007 10:04 |
| ff margins | Dapandyman | Web Page Design | 10 | Feb 12th, 2007 23:03 |
| body margins | benbacardi | Web Page Design | 2 | Apr 10th, 2004 14:51 |