...

View Full Version : NEED URGENT HELP! CSS Absolute Positioning!



corecase
11-22-2010, 02:26 AM
Hey guys, i'm using absolute position to position my navigation bar at the top of my page. In google chrome the position is correct; however, in internet explorer for some reason it's different. So when it's correct in chrome it's not in ie7 and vice versa. The nav bar is a list within a div.

Excavator
11-22-2010, 02:30 AM
Hello corecase,
There are so many things that could be wrong ...
Without seeing a link to your site, or your code at the very least, it's anyones guess.

corecase
11-22-2010, 04:33 AM
Here's the part of the code where the error should be:

Html part:
<div id="header">

<img id="logo" />
<ul id="nav" style="list-style: none">
<li class="selected"> Products</li>
<li>Reseller Rescources</li>
<li>Get Certified</li>
<li>About Us</li>
</ul>
</div>
CSS part:
#nav
{
position:absolute;
overflow:auto;
left:429px;
bottom: 916px;
font-size:11pt;
font-family: Helvetica;
font-style: italic;
color: #ffffff;
font-weight: bold;
}
#nav li
{
float:left;
border:1px solid;
border-color: #C92127;
border-left-width:0;
padding:12px 10px;
background-color: #E13A3E;
}

#nav li:first-child
{
border-left-width:1px;
}

#nav li.selected
{
cursor:default !important;
}

#nav li:hover
{
background-color:#eee;
color: #1A1A1A;
cursor:default;
}

#header
{
margin-bottom:20px;
position:relative;
}

santhoshj400
11-22-2010, 05:01 AM
Hi,
First of all i request you not to use absolute for positioning , except when you need to have menu being displayed infront i.e giving z-index ,because absolute positioning will create unnecessary problems ,any way try to position by removing absolute,please post link so that we can verify where the problem is,and one more thing is IE behavior is entirely different from other browser it just take pixels as square not as dot this is applied till IE7 not for IE8 and 9

abduraooft
11-22-2010, 07:32 AM
Here's the part of the code where the error should be:
We need to see your complete HTML(including DOCTYPE)+CSS, or a link to your page.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum