views:

58

answers:

4

hi,

I've some issues with IE 7, could you please tell me how to avoid my content to shift down when I move the mouse over Contact (under the title)

http://www.lancelmaat.nl/drupal/index.php?q=allwork

thanks

A: 

the hover-menue of "contact" is higher than the rest of the site. one possibility you could try is setting height:100% on your body and html.

oezi
you mean this ? html, body { height:100%;} it didn't work.
Patrick
A: 

from what i see I feel that the <p> creates extra padding. Try <div> instead of <p> or try <p style="margin:0px;padding:0px;"> in

<p>KAREN LANCEL:<br />
lancel(at)xs4all.nl<br />
phone 0031 (0)624873424</p>

Just a suggestion to try.

Raine
ok thanks. I've added (and then removed) #block-block-1 p { margin:0px; padding:0px;} but it didn't work. Same issue. Furthermore, I want to keep the padding, because I want the paragraphes be separated.
Patrick
well, i didn't mean it for all P elements, just for the first one, but if it didn't work, my other suggestion (because it is only observed in IE) is to remove the whitespace between the div and the p in <div class="content"><p>KAREN LANCEL
Raine
don't underestimate whitespace, this might sound silly, but occasionally it does break presentation, and not just in IE
Raine
well I've removed the whitespace with $('#block-block-1 .content').text($('#block-block-1 .content').text().replace(/^\s*|\s*$/g,'')); but still it is sliding down
Patrick
+1  A: 

I've solved by moving the contact div at the bottom of the page. In this way it has not other divs after him, that are shifted by IE6 and 7.

But this solution is not generalizing well for other websites.

Patrick
A: 

I believe what you're looking for is actually position: absolute

This will pull the element out of the normal flow of the document, and make it so the layout won't be affected by its display. From there, position the container with left: (px), and top: (px), or with margins.

Ryan Kinal
it is already set (position:absolute), but in IE 6 and 7, the position of the following elements, is still influenced. (if you switch between display:none, display:block for example when you move the mouse over
Patrick