Forum Moderators: not2easy

Message Too Old, No Replies

navmenu ok in ie6 but overshoots right in ns7.1

navmenu ie6 overshoots right ns7.1

         

plusco

8:48 pm on May 8, 2004 (gmt 0)

10+ Year Member



To get my navmenu to go completely to the right edge of my container in ie6, I had to double the margin-right to -280px to accomodate for my right border of 140. However, on NS7.1, it thows the navemenu 140px beyond the main container, thus it hangs off the right side. Any suggestions to remedy this? Thanks.

<style>
#navmenu {
margin-left: 0px;
margin-right: -280px;
background-color: #879186;
border: 1px solid #000;
border-width: 1px 0;
padding: 3px 0;
position: relative; }
</style>

<div id="navmenu">
<ul>
<li class="first">
<a href="#">links&nbsp;and&nbsp;links</a>
</li>
<li>
<a href="#">links&nbsp;and&nbsp;links</a>
</li>
<li>
<a href="#">links&nbsp;and&nbsp;links</a>
</li>
<li>
<a href="#">links&nbsp;and&nbsp;links</a>
</li>
<li class="last">
<a href="#">links&nbsp;and&nbsp;links</a>
</li>
</ul>
<span id="navclear"></span>
</div>

TheDoctor

12:45 pm on May 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



plusco, I'm not sure what you're trying to do here. Are you trying to get a navbar on the left side of your page?

But, in any case, don't use pixels. This means that your navbar won't change size along with the browser window. Use percentages. This might solve your problem anyoway

HarryM

1:22 pm on May 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In a standards compliant browser position:relative should refer to the coordinates of whatever contains the div, but with IE it can sometimes give strange effects.

Without specifying "top" or "left" the browser defaults to "auto" which may or may not be what you want depending on the browser.

Setting marginright:-anything; will give you problems because the IE box model is non-standard and IE will take its point of reference differently to compliant browsers.

If you want the navmenu on the right you could float it right within the container. If it floats over the border of your container, you can create an inner container in which to float it.

plusco

2:55 am on May 10, 2004 (gmt 0)

10+ Year Member



Thanks both of you for the help. A second container did the trick.