David Passmore
David Passmore

Reputation: 6099

CSS: page and width 100%

Now I am probably being dumb here, but I have the following css:

*{
    margin:0;
    padding:0;
}

body {
    background:url(../img/bg/bg-body.jpg) repeat top left #f0f0f0;
    font-family:"ProximaNova", Arial, Helvetica, sans-serif;
    color:#ffffff;
    width:100%;
}

#header {
    background: #000000;
    border-bottom: 1px solid #282828;
    height:126px;
    min-width:1000px;
    zoom:1;
}

#header #nav {
    height:46px;
    line-height:46px;
    margin-top:10px;
    background:url(../img/bg/nav/nav-bg.png) repeat-x top left #000000;
}

The problem is that when a user zooms-in on the page this happens:

Whereas it should be like this:

I need help with this, I would appreciate any help I could get.

@Jessica, here is the html code:

<div id="header">

<div id="content-wrap" class="header">

<div id="logo"></div>

<!--Begin News-->
<div id="news-scroller">
<b>Recent News: </b>
    <span id="quote-left">"</span>
        <div id="news-content">
            <a href="#">
            <?php
            if (mysql_num_rows($news)== 0){
                echo "There is currently no news from the Bowlplex Doubles, however there will be soon!";
            } else {
            echo $output['content'];
            }
            ?>
            </a>
        </div>
    <span id="quote-right">"</span>
    <div id="post">
        <b>Posted</b> <?php echo $output['date'].",&nbsp;".$output['time']; ?>
    </div>
</div>
<!--/End News-->

</div>

<!--Begin Navigation-->
<div id="nav">

<ul>

<a href="/"><li class="active">Home</li></a>
<a href="/scores"><li>Scores</li></a>
<a href="/entries"><li>Entry Forms</li></a>
<a href="/scoreboard"><li>Live Scoreboard</li></a>
<a href="/contact"><li>Contact</li></a>
<a href="/archive"><li class="last">Archive</li></a>

</ul>

</div>
<!--/End Navigation-->

</div>
<!--/End Header-->

UPDATE

New Code:

body {
    background:url(../img/bg/bg-body.jpg) repeat top left #f0f0f0;
    font-family:"ProximaNova", Arial, Helvetica, sans-serif;
    color:#ffffff;
    width:100%;
}
#header {
    background: #000000;
    border-bottom: 1px solid #282828;
    height:126px;
    min-width:100%;
    min-width:1000px;
    zoom:1;
}

However the issue still exists.

Upvotes: 0

Views: 248

Answers (2)

stephenmurdoch
stephenmurdoch

Reputation: 34643

I find this problem can be fixed, to some extent by setting min-width on the body. I normally just go with 960px or something like that.

body { min-width: 1000px; }

I asked a similar question here

Upvotes: 0

Jessica Burnett
Jessica Burnett

Reputation: 769

min-width:1000px David, try setting this property to a percent as well. What does your HTML code look like? Can you post it.

Upvotes: 1

Related Questions