Andrew
Andrew

Reputation: 3589

Image and div sections are cut off when browser size is decreased

On the website I'm building, after I decrease the size of the browser, the header images and div sections are just cut off: enter image description here

I've tried tracing the code using Firebug, but I really can't figure out what I'm doing wrong. Any ideas?

CSS:

.slide {
    padding-top: 125px;
    background-attachment: fixed;
    width: 100%;
    height: 100%;
    min-height: 960px;
    position: relative;
    box-shadow:inset 0px 10px 10px -10px rgba(0,0,0,0.3);
}
div#home, div#contact  {
    min-height: 480px;
 }
div#inner-container {
    text-align: left;
    width: 960px;
    margin: 0 auto;
    padding: 0;
    white-space: normal;
    position: relative;
    height: 100%;
 }
 div#greenPortion {
    background-color: #3CA67B;
    min-width: 100%;
    height: 200px;
    bottom: 0;
    position: absolute;
 }
 div#title {
    background-image:url(../images/banner.png);
    margin: 0 auto;
    padding: 0;
    min-width: 100%;
    height: 200px;
 }

HTML:

<div class="slide" id="home" data-slide="1" data-stellar-background-ratio="1">
        <div id="inner-container">
            <div id="name" clas="row">
                <img src="images/names.png">
            </div>                            
        </div>
        <div id="greenPortion"></div>
    </div>

Website: http://andrewgu12.kodingen.com/

Any help would be appreciated, thanks!

Upvotes: 1

Views: 2492

Answers (2)

omma2289
omma2289

Reputation: 54629

Set a width in percentage to make the elements adjust to the window size

div#inner-container {
    width: 100%;
}

div#header {
    width: 100%;
}

Also you should look into using media queries to adjust the look of your site at different screen resolutions

Upvotes: 0

3dgoo
3dgoo

Reputation: 15794

Apply min-width: 960px to your body in css:

CSS

body {
    ...
    min-width: 960px;
    ...
}

Upvotes: 1

Related Questions