margin:0 auto IE6 problem

Posted by senzacionale on Stack Overflow See other posts from Stack Overflow or by senzacionale
Published on 2010-03-15T20:57:41Z Indexed on 2010/03/15 20:59 UTC
Read the original article Hit count: 326

Filed under:
|

Can someone please tell me ehy in IE 6 div is not in center. I use margin: 0 auto; Problem is only in IE6!

HTML

<div id="center">
    <div id="top_menu">
        <a href="/Default.aspx">Domov</a> 
        · <a href="/EnterSite.aspx">Vpišite stran</a> 
        · <a href="/About.aspx">O nas</a> 
        · <a href="/Help.aspx">Pomoc pri iskanju</a> 
        · <a href="/Marketing.aspx">Oglaševanje</a> 
        · <a href="/Info.aspx">Splošni pogoji in pravila</a>
    </div>
    <a href="http://www.viamura.si"><img src="/images/viamura_logo.png" width="294" height="95" border="0" alt="viamura" /></a>
    <div id="tabs">
        <ul>
            <li><asp:LinkButton ID="btnWeb" runat="server" CssClass="web_selected" 
                    onclick="btnWeb_Click">Web</asp:LinkButton></li>
            <li><asp:LinkButton ID="btnMap" runat="server" CssClass="map" 
                    onclick="btnMap_Click">Zemljevidi</asp:LinkButton></li>
            <li><asp:LinkButton ID="btnWeather" runat="server" CssClass="weather" 
                    onclick="btnWeather_Click">Vreme</asp:LinkButton></li>
            <li><asp:LinkButton ID="btnImages" runat="server" CssClass="images" 
                    onclick="btnImages_Click">Slike</asp:LinkButton></li>
            <li><asp:LinkButton ID="btnConverter" runat="server" CssClass="converter" 
                    onclick="btnConverter_Click">Converter</asp:LinkButton></li>
        </ul>
    </div>

CSS:

center {

width:520px; margin:0 auto; }

tabs {

width:400px; margin:0 auto; }

tabs ul li a.web,#tabs ul li a.map,#tabs ul li a.weather,#tabs ul li a.images,#tabs ul li a.converter,#tabs ul li a.web_selected,#tabs ul li a.map_selected,#tabs ul li a.weather_selected,#tabs ul li a.images_selected,#tabs ul li a.converter_selected {

background-color:#0C0; float:left; height:18px; text-indent:-9999px; }

tabs ul {

float:left; width:459px; margin:10px 0 0 41px; }

tabs ul li {

float:left; margin:0 2px 0 0; }

tabs ul li a.web {

background:url(../images/tab_web.png) no-repeat; width:46px; }

tabs ul li a.map {

background:url(../images/tab_map.png) no-repeat; width:80px; }

tabs ul li a.weather {

background:url(../images/tab_weather.png) no-repeat; width:58px; }

tabs ul li a.images {

background:url(../images/tab_images.png) no-repeat; width:48px; }

tabs ul li a.converter {

background:url(../images/tab_converter.png) no-repeat; width:78px; }

tabs ul li a.web_selected {

background:url(../images/tab_web_selected.png) no-repeat; width:46px; }

tabs ul li a.map_selected {

background:url(../images/tab_map_selected.png) no-repeat; width:80px; }

tabs ul li a.weather_selected {

background:url(../images/tab_weather_selected.png) no-repeat; width:58px; }

tabs ul li a.images_selected {

background:url(../images/tab_images_selected.png) no-repeat; width:48px; }

tabs ul li a.converter_selected {

background:url(../images/tab_converter_selected.png) no-repeat; width:78px; }

© Stack Overflow or respective owner

Related posts about c#

Related posts about css