Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   MSIE % Margin problem. (http://www.velocityreviews.com/forums/t160104-msie-margin-problem.html)

dlychowyd 11-28-2004 02:34 AM

MSIE % Margin problem.
 
I've been having some problems with a particular layout i've been
working on. http://darren.lychowyd.com/mono/ It works as I expect it to
in FireFox but it doesn't load properly in MSIE. When the page first
loads there is extra marging between my h1 and my 2 floating divs. When
you hover your mouse over one of the list-item links the margin
disappears and moves everything up to where I hoped it would be in the
first place. Can anyone explain this? Can anyone give me a solution to
my problem?


rf 11-28-2004 03:40 AM

Re: MSIE % Margin problem.
 
dlychowyd wrote:

> I've been having some problems with a particular layout i've been
> working on. http://darren.lychowyd.com/mono/ It works as I expect it to
> in FireFox but it doesn't load properly in MSIE. When the page first
> loads there is extra marging between my h1 and my 2 floating divs. When
> you hover your mouse over one of the list-item links the margin
> disappears and moves everything up to where I hoped it would be in the
> first place. Can anyone explain this? Can anyone give me a solution to
> my problem?


Short answer:

You are specifying top margin in percentage for those divs. Don't.

Long answer:

Percent of what? The viewport presumably, however IE actually uses the width
of the viewport not, as you might expect, the height. You can verify this by
draging the right border of your window around. As the width changes then so
does the gap above the divs.

Guesswork:

When IE first lays out the page (on reload, or on change of window size)
uses the width of the viewport, that is the entire width of the browsers.

Now, roll over something. Things have changed so IE does a new layout.
However, this time the page has already been layed out. So, it sort of does
a re-layout. This time however it uses the width of the viewport minus a
possible scroll bar. Slightly smaller than before. You get that small
movement.

So, don't use % for that margin. Use em or px or furlongs or something
actual.

--
Cheers
Richard.



kchayka 11-28-2004 03:54 AM

Re: MSIE % Margin problem.
 
On 27 Nov 2004 18:34:42 -0800, "dlychowyd" <dlychowyd@gmail.com> wrote:

> http://darren.lychowyd.com/mono/
> When
> you hover your mouse over one of the list-item links the margin
> disappears and moves everything up to where I hoped it would be in the
> first place. Can anyone explain this?


<URL:http://www.positioniseverything.net/explorer.html>

Lots of weird IE bugs to choose from. ;)


dlychowyd 11-28-2004 04:06 AM

Re: MSIE % Margin problem.
 
Thanks Richard, it helped and thanks for the bug list it will help to
avoid similar IE problems. I got another question. Is it possible to
get something like min-width to work in IE?


rf 11-28-2004 04:34 AM

Re: MSIE % Margin problem.
 
dlychowyd wrote:

> Thanks Richard, it helped and thanks for the bug list it will help to
> avoid similar IE problems. I got another question. Is it possible to
> get something like min-width to work in IE?


Several hacks, most of them involving a bit of content as wide as the
requried minimum width. A div with width set to minwidth would do.

--
Cheers
Richard.




All times are GMT. The time now is 04:18 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.