1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

HTML Right column doesn't want to go to the top

Discussion in 'Web Development' started by lemrin, Apr 24, 2011.

Thread Status:
Not open for further replies.
  1. lemrin

    lemrin New Member

    Hey guys,
    I'm new to using css as a template for a full page, generally I've just used styles in the past for inpage content.

    Anyway, I downloaded one of the templates today and have been messing about with it as I wanted it to use up all of the available space. My third column ( "News" ) is displaying to teh right as it should but is below the other content rather than at the top. I know it is either something to do with that div or with the "capabilities" div but whatever it is is eluding me.

    I will paste the css below and hope that somebody may spot something that I haven't.

    Many thanks for anybody more observant than I am.

    body {
    font-family: tahoma, helvetica, arial, sans-serif;
    font-size: 10px;
    text-align: center;
    background: url(images/page_bg.jpg);
    color: #6f6f6f;
    }
    html, body, #wrapper, h1, #nav-top, #nav-top li, #nav-left, #nav-top li {
    margin: 0;
    padding: 0;
    list-style: none;
    }
    th, td {
    font-size: 11px;
    }
    img { border: 0; }
    #wrapper {
    text-align: left;
    position: relative;
    margin-top: 16px;
    margin-right: 0px;
    margin-bottom: 16px;
    margin-left: 0px;
    }
    h1, h2, h3 {
    font-size: 11px;
    }

    h1 {
    margin: 0;
    padding: 0;
    }
    h2 {
    margin: 0 0 5px 0;
    padding: 0;
    }
    h3 {
    padding: 4px 0 0 0;
    }
    p {
    margin: 1em 0;
    padding: 0;
    }
    .block {
    display: block;
    }
    .clear {
    clear: both;
    height: 1px;
    padding-top: 0;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1px;
    line-height: 1px;
    }
    * html .clear {
    margin-top: -5px;
    margin-bottom: -4px;
    }
    .left {
    float: left;
    margin: 1px 8px 0px 0px;
    }
    .softright {
    text-align: right;
    }
    .readmore {
    text-align: right;
    }
    /* ***** */
    #wrapper {
    }
    /* header */
    #header {
    background: url(images/header_bg.gif) repeat-x;
    position: relative;
    width: 688px;
    margin-bottom: 11px;
    }
    #header .bl { height: 157px; }
    #header .tr { background: url(images/header_tr.gif) top right no-repeat; }
    #header .bl { background: url(images/header_bl.gif) bottom left no-repeat; }
    #header .br { background: url(images/header_br.jpg) bottom right no-repeat; width:100%;}
    /* the story of two navs */
    #nav-top {
    position: absolute;
    top: 17px; left: 252px;
    color: #fff;
    }
    #nav-top li {
    display: inline;
    }
    #nav-top a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    }
    #nav-top a:hover {
    text-decoration: underline;
    }
    #nav-left {
    position: absolute;
    top: 66px; left: 26px;
    }
    /* body */
    #body {
    background: url(images/body_bg.gif) repeat-y;
    }
    #body h2 {
    margin: 0 0 1.5em 0;
    }
    #body h3 {
    margin: 0 0 0 0;
    }
    #body ul {
    margin: 0;
    padding: 0;
    list-style: none;
    }
    #body li {
    padding: 0;
    margin: 0.8em 0;
    }
    a {
    color: #ce7210;
    }
    a:hover {
    color: #6f3f0b;
    }
    #cap {
    background: url(images/column_cap.gif) no-repeat;
    padding-top: 19px;
    width: 688px;
    }
    #buy {
    float: left;
    width: 189px;
    margin-left: 12px;
    display: inline;
    }
    #capabilities {
    margin-left: 300px;
    margin-right: 300px;
    padding: 1em;
    }
    #capabilities p {
    line-height: 1.5;
    }
    #capabilities h3 {
    font-size: 10px;
    }
    #news {
    float: right;
    width: 190px;
    margin: 0px;
    padding: 1em;
    }
    #news h3 {
    font-size: 10px;
    }
    #news h3 a {
    text-decoration: none;
    }
    #news p {
    line-height: 1.5;
    }
    .timed h3 {
    background: #91bbed;
    color: #FFF;
    padding: 10px 0 10px 0;
    text-indent: 10px;
    }
    .timed p.support {
    margin: 0;
    background: url(images/support_bg.jpg) no-repeat top left;
    padding: 0 10px 0 90px;
    height: 80px;
    }
    .timed p.more {
    background: #5b96da;
    margin: 0;
    padding: 5px 0 5px 0;
    }
    .timed p.more a {
    color: #FFF;
    font-weight: bold;
    margin: 0 0 0 100px;
    text-decoration: none;
    }
    /* footer */
    #footer {
    clear: both;
    text-align: center;
    background: url(images/footer_bg.gif) repeat-x;
    }
    #footer div div { padding: 8px 0; }
    #footer, #footer a {
    color: #fff;
    }
    #footer div { background: url(images/footer_l.gif) no-repeat; width:100%; }
    #footer div div { background: url(images/footer_r.gif) top right no-repeat;width:100%; width:100%; }
     
  2. lemrin

    lemrin New Member

    Have solved this now and the problem didn't lie in the css but in the html. I had to change my html so that the page outputs the right column before it outputs the centre one. A really odd little quirk of css I thought as I wasn't aware that it should make any difference which one you output first. Logic would have told me to do the left, the centre then the right column. I ended off outputting the left then the right then the centre so my logic was wrong. All sorted now though.
     
  3. CovertPea

    CovertPea Moderator Staff Member Verified Member

    Good to hear Lemrin.
    I'll close this post but leave it online ifor other members who find they may have a similar problem.

    Cheers
    CP
     
Thread Status:
Not open for further replies.