SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: IE Positioning problem
-
May 25, 2005, 13:22 #1
- Join Date
- Dec 2004
- Location
- portland
- Posts
- 3
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
IE Positioning problem
Hi.
I have problem positioning a right nav container in IE. It works ok in firefox.
http://www.hawaiiactive.com/warren/c...um=Act_Num=110
The css involved is
#rightnav
{
position: absolute;
top: 120px;
margin-left: 610px;
margin-right: 10px;
background: #ffcc00;
width: 120px;
}
Why is IE so wide to the right?
thanks
-
May 25, 2005, 13:34 #2
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Hi,
You haven't supplied any positioning so the margin-left is taking effect from where ie thinks the element is.
You need to set position:relative on the main container to set astacking context and then the following code should be effective.
Code:#container { width: 740px; text-align: left; margin: -10px auto; background: #ffcc00; color: #333; line-height: 130%; position:relative; } #rightnav { position: absolute; top: 120px; right:10px; background: #ffcc00; width: 120px; }
Bookmarks