Help with positioning in IE
Posted: Mon, 2005-11-21 22:18
Hi, AM creating a webpage
http://www.exploitation.org.uk/Test/index.html
Everything fine in Firefox, but when viewed in IE it goes out of position.
Any ideas or advice would be much appreciated.
The css is at the following


Moderator
Posts: 13597
Joined: 2004-06-06
Location: London
Help with positioning in IE
Posted: Mon, 2005-11-21 23:33
Validate the markup!
You cannot have <p> (block level) elements nested in anchors (line elements)
Hugo.
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me
Enthusiast
Posts: 57
Joined: 2005-11-16
Location: FR spoken
Help with positioning in IE
Posted: Tue, 2005-11-22 00:43
hello,
Ie, for some obscure reasons do sometimes, and here in your case, double the values of the margin in floating boxes.
to cure that you need to tell him somethings different.
here to test i used the !important hack, but you should apply this values through a "conditional comment" just for IE below 7.
so:
you may use as well a
float:left;for #col1and for #mainPicture try this :
and again for #mainText:
notice that problem seems to appears so far only in #withe box,
it shouldn't be to difficult to take care of.
I hope that helps
Guru
Posts: 2964
Joined: 2004-02-05
Location: A hilly place, UK
Help with positioning in IE
Posted: Tue, 2005-11-22 07:48
Hi
Usually, adding display:inline fixes doubled margin bug in IE, and doesn't affect other browsers, so doesn't need hiding in a hack.
Trevor
Give your site a valid doctype | Uncollapsing Margins
Moderator
Posts: 13597
Joined: 2004-06-06
Location: London
Help with positioning in IE
Posted: Tue, 2005-11-22 10:04
Careful with the use of hacks gcyrillus, this is a known bug and simply sorted with display inline, !important is not really a hack and makes me worry when I see it used too often in rule sets to try and compensate for bugs or to correct specificity problems.
Hugo.
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me
Enthusiast
Posts: 144
Joined: 2004-11-29
Help with positioning in IE
Posted: Tue, 2005-11-22 20:03
Hi, have rectified my xhtml etc and have redone my CSS...like mentioned.
But still cannot get the positioning sorted in IE
http://www.exploitation.org.uk/Test/index.html
Any ideas guys ??
Enthusiast
Posts: 57
Joined: 2005-11-16
Location: FR spoken
Help with positioning in IE
Posted: Tue, 2005-11-22 22:23
hello,
did you try, the float:left; to #col1 ?
( else maybe it has to do with this : #col1 is "width:133px;" and #menubox is 135px .)
(thanks, for the "inline", it was not a "known bug" for me.
)
Gc
<edit>just tryed, with display:inline; instead of the the "hack" !important, + float:left; to #col1, it works fine on my computer.
(you did not apply the display:inline; in the css in your link;)
+ those 2 pixels make you having to float #col1 !?
Enthusiast
Posts: 144
Joined: 2004-11-29
Help with positioning in IE
Posted: Tue, 2005-11-22 23:10
Hi, gcyrillus.....how did you get that to work?????
What I have done is created a css file that is open to all browsers
but anything that needs changing in ie is placed in another css file. This is placed within the head tag of the page.
<link href="http://www.exploitation.org.uk/Test/SunInvestStyle.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 7]>
<link href="http://www.exploitation.org.uk/Test/SunInvestIEStyle.css" rel="stylesheet" type="text/css" />
<![endif]-->
Doing it this way I don't need to use the important tag and it makes all the css code much tidier.
But cannot get it to work in IE with the col1 floating left. If you can post the code that you tried will have a play.
Much appreciated...think have been staring at it for to long that I can't find the error
regards
Enthusiast
Posts: 57
Joined: 2005-11-16
Location: FR spoken
Help with positioning in IE
Posted: Tue, 2005-11-22 23:25
hi,
here it goes:
I have win 32 xp home and IE6 set medium size for the font-size !, then trying to increase it, i had your page rightaway mess up again !, maybe you should fixed as well a font-family and a font size, (if you did not, <edit> you did ! 74%, maybe it's better then to use pixel ?, then it will not allow IE to resize the font.) .
Sorry , i surf with firefoxe, and use it to edit css live mostly, i didnot notice, your extra file for IE.
I hope, this is it !
Enthusiast
Posts: 144
Joined: 2004-11-29
Help with positioning in IE
Posted: Wed, 2005-11-23 09:02
gcyrillus. Nice one for that...think you are right it must be down to the actual fon size.....good work mate most appreciated