Hey Sitepointers,
I've got two problems with a site I am designing. These problems occur in IE7 and IE8.
First of all I have a div that contains some text and for some reason won't center the text like in the other browsers.
HTML:
Code HTML4Strict:<div id="info_block"> dé haarlemse <br/><a href="#">woonwinkel</a><br/> <div id="info_block_divide"></div> <a href="#">ontwerpstudio</a> </div>
(I put the br's in there to try and fix it but this did nothing)
CSS:
Code CSS:#info_block { text-align:center; width:140px; height:110px; background:url(../images/info_block_bg.png); color:#fff; position:absolute; left:70px; top:50px; font-size:18px; font-style:italic; z-index:2; padding:15px; text-shadow:2.5px 2.5px 5px #000; -moz-text-shadow:2.5px 2.5px 5px #000; } #info_block_divide { height:40px; } #info_block a{ color:#fff; text-decoration:none; text-shadow:2.5px 2.5px 5px #000; -moz-text-shadow:2.5px 2.5px 5px #000; } #info_block a:hover { text-shadow:0 0 5px #FF9; -moz-text-shadow:0 0 5px #FF9; }
I do have one extra css addition for IE only (whitespace:nowrap because of italics problems) but when I remove this it still won't center the text.
I've also tried adding !important and this doesn't work (it shouldn't in my situation but trying everything).
The weird thing is, when I change all the text to: text it does work, so for some reason the text is too wide to be centered and it just puts it on the left.
Secondly I've got some links under each other that should get a check mark to a margin from their right on hovering. The links have variable widths depending on the text so I can't use display:block.
What I tried doing is display:inline with a padding-right and then on hover adding a background image. This works in FF/Safari/Chrome but not IE.
Halp!








but glad you found a fix anyway.
Bookmarks