Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

CSS Problem - Getting page to resize to screen

  • 27-04-2012 05:38PM
    #1
    Closed Accounts Posts: 1,663 ✭✭✭


    Having a CSS problem - can't get the page to resize to the screen. Currently I've 300px heights set, but what do I need to do to set it so that both columns resize depending on the screen/window size?

    Thanks in advance for any help on this...
    body {
        margin: 0;
        padding: 0;
        background:  #333 url(/images/bg01.jpg) repeat-x top left;
        font-size: 13px;
        color: #7F7F7F;
        height: 300px;
    }
    
    body, th, td, input, textarea, select, option {
        font-weight: normal;
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    }
    
    h1, h2, h3 {
        font-weight: normal;
        color: #484848;
    }
    
    h1 {
        text-transform: lowercase;
        letter-spacing: -1px;
        font-size: 24px;
    }
    
    h2 {
        text-transform: lowercase;
        letter-spacing: -1px;
        font-size: 24px;
    }
    
    h3 {
        font-size: 1em;
    }
    
    p, ul, ol {
        line-height: 200%;
    }
    
    blockquote {
        padding-left: 1em;
    }
    
    blockquote p, blockquote ul, blockquote ol {
        line-height: normal;
        font-style: italic;
    }
    
    a {
        color: #7ACE11;
    }
    
    a:hover {
        text-decoration: none;
        color: #7ACE11;
    }
    
    /* Header */
    
    #header {
        width: 890px;
        height: 190px;
        margin: 0px auto;
    }
    
    /* Logo */
    
    #logo {
        float: left;
        padding: 40px 0 0 0;
    }
    
    #logo h1 {
        margin: 0;
        text-transform: lowercase;
        letter-spacing: -2px;
        font-size: 3.6em;
        font-weight: normal;
        color: #FFFFFF;
    }
    
    #logo h1 a {
        padding-right: 20px;
        text-decoration: none;
        color: #FFFFFF;
    }
    
    #logo p {
        margin: -5px 0 0 0;
        text-transform: uppercase;
        font-size: 1.22em;
        letter-spacing: -1px;
    }
    
    #logo a {
        text-decoration: none;
        color: #FFFFFF;
    }
    
    /* Menu */
    
    #menu {
        float: right;
    }
    
    #menu ul {
        margin: 0px;
        padding: 93px 0px 0px 0px;
        list-style: none;
    }
    
    #menu li {
        display: inline;
    }
    
    #menu a {
        display: block;
        float: left;
        margin-left: 20px;
        text-decoration: none;
        text-transform: lowercase;
        font-size: 1.36em;
        color: #FFFFFF;
    }
    
    #menu a:hover, .active a {
        border-bottom: 3px solid #FFFFFF;
    }
    
    
    /* Page */
    
    #page {
        width: 890px;
        margin: 0 auto;
        height: auto;
    }
    
    /* Content */
    
    #content {
        float: left;
        width: 600px;
        overflow: scroll;
        height: 300px;
    }
    
    .post {
        padding: 20px 20px;
        background: url(/images/bg04.jpg) no-repeat top left;
    }
    
    .title {
        margin: 0;
        border-bottom: 2px solid #484848;
        color: #484848;
    }
    
    .byline {
        margin: 0;
        color: #D79B00;
    }
    
    .meta {
        text-align: left;
        color: #646464;
    }
    
    .meta .more {
        padding-left: 20px;
        background: url(/images/img03.gif) no-repeat left center;
    }
    
    .meta .comments {
        padding-left: 20px;
        background: url(/images/img04.gif) no-repeat left center;
    }
    
    /* Sidebar */
    
    #sidebar {
        float: left;
        width: 240px;
        text-align: center;
        height: inherit;
    }
    
    #sidebar ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    
    #sidebar li {
    }
    
    #sidebar li ul {
        padding: 15px 0;
    }
    
    #sidebar li li {
        padding-left: 20px;
        border-bottom: 1px dotted #7B9418;
    }
    
    #sidebar h2 {
        margin: 0;
        padding: 5px 0 0 20px;
        background: url(/images/img06.jpg) no-repeat left 80%;
    }
    
    #sidebar a {
        text-decoration: none;
    }
    
    #sidebar a:hover {
    }
    
    /* Footer */
    
    #footer {
        clear: both;
        margin: 0px;
        height: 80px;
        background: #F2F2F2 url(/images/bg02.jpg) repeat-x left top;
    }
    
    #footer p {
        padding: 20px 0;
        text-align: center;
        font-size: smaller;
        color: #717171;
    }
    


Comments

  • Closed Accounts Posts: 18,253 ✭✭✭✭uck51js9zml2yt


    you need to use viewport iin the head.

    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    Others may add to this.


Advertisement