Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Side bar on the right instead of the left?

    Hi,

    I was working on a website, and when i loaded it in FireFox,Safari, and Internet Explorer. the side bar is on the right instead of the left and the text is all the way on the bottum?

    Do you guys now how i can fix that?

    Thanks
    thats my .CSS
    PHP Code:
    /*
    Design by Free CSS Templates
    http://www.freecsstemplates.org
    Released for free under a Creative Commons Attribution 2.5 License
    */

    body {
        
    margin-top10px;
        
    padding0;
        
    background#787878 url(images/img01.jpg) repeat left top;
        
    text-alignjustify;
        
    font-familyGeorgia"Times New Roman"Timesserif;
        
    font-size12px;
        
    color#616161;
    }

    h1h2h3 {
        
    margin-top0;
        
    text-transformuppercase;
        
    color#528DC8;
    }

    h1 {
        
    font-size1.6em;
        
    font-weightnormal;
    }

    h2 {
        
    font-size1.6em;
    }

    h3 {
        
    font-size1em;
    }

    ul {
    }

    {
        
    text-decorationnone;
        
    color#528DC8;
    }

    a:hover {
        
    border-bottomnone;
    }

    a img {
        
    bordernone;
    }

    img.left {
        
    floatleft;
        
    margin0 20px 0 0;
    }

    img.right {
        
    floatright;
        
    margin0 0 0 20px;
    }

    #header {
        
    width960px;
        
    margin0 auto;
        
    height150px;
    }

    /* Header */

    #logo {
        
    width960px;
        
    height100px;
        
    margin0 auto;
        
    padding0;
    }

    #logo h1, #logo p {
        
    floatleft;
        
    margin0;
        
    color#528DC8;
    }

    #logo span {
        
    color#000000;
        
    text-aligncenter;
    }

    #logo h1 {
        
    padding25px 0 0 0;
        
    letter-spacing: -1px;
        
    text-transformlowercase;
        
    font-weightnormal;
        
    font-size3em;
    }

    #logo p {
        
    text-transformuppercase;
        
    padding47px 0 0 3px;
        
    font-size10px;
        
    color#110E0F;
        
    text-aligncenter;
    }

    #logo a {
        
    bordernone;
        
    text-decorationnone;
        
    color#528DC8;
    }

    /* Menu */

    #menu {
        
    width960px;
        
    margin0px auto;
        
    padding0px;
        
    height52px;
        
    backgroundurl(images/img02.jpgno-repeat left top;
    }

    #menu ul {
        
    margin0px;
        
    padding0px;
        list-
    stylenone;
    }

    #menu li {
        
    displayinline;
    }

    #menu a {
        
    displayblock;
        
    floatleft;
        
    height33px;
        
    margin0px;
        
    padding19px 30px 0px 30px;
        
    text-decorationnone;
        
    text-transformcapitalize;
        
    backgroundurl(images/img03.jpgno-repeat right 50%;
        
    font-familyGeorgia"Times New Roman"Timesserif;
        
    font-size12px;
        
    color#FFFFFF;
    }

    #menu a:hover {
        
    color#FFFFFF;
    }

    #menu .current_page_item a {
        
    color#FFFFFF;
    }

    /* Wrapper */

    #wrapper {
    }

    /* Page */

    #page {
        
    width960px;
        
    margin0px auto;
        
    backgroundurl(images/img05.jpgrepeat-y left top;
    }

    #page-bgtop {
        
    backgroundurl(images/img04.jpgno-repeat left top;
    }

    #page-bgbtm {
        
    backgroundurl(images/img06.jpgno-repeat left bottom;
    }


    /* Latest Post */

    #latest-post {
        
    padding20px;
        
    border1px solid #E7E7E7;
        
    floatleft;
    }

    /* Content */

    #content {
        
    floatleft;
        
    width500px;
        
    margin0px;
        
    padding20px 0px 0px 0px;
    }

    .
    post {
        
    padding-bottom15px;
        
    line-height200%;
    }

    .
    post h1 {
        
    font-weightnormal;
    }

    .
    title {
        
    height50px;
        
    margin0px 10px;
        
    padding11px 0px 4px 10px;
        
    text-transformcapitalize;
        
    font-weightnormal;
        
    backgroundurl(images/img12.jpgno-repeat left top;
    }

    .
    title a {
        
    border-bottomnone;
        
    color#528DC8;
    }

    .
    title a:hover {
    }

    .
    byline {
        
    margin: -10px 20px 20px 20px;
        
    color#F00;
        
    font-weightbold;
    }

    .
    tag {
        
    padding0 15px;
    }

    .
    entry {
        
    padding0 20px;
        
    font-weightbold;
        
    font-size14px;
    }

    .
    links {
        
    padding4px 0px;
        
    text-alignright;
        
    font-weightbold;
    }

    .
    links a {
        
    bordernone;
    }

    .
    links a:hover {
    }

    /* Sidebars */

    #sidebar1 {
        
    floatleft;
        
    padding-top;
        
    padding-left;
    }

    #sidebar2 {
        
    floatleft;
    }

    #sidebar1 ul {
        
    padding-bottom20px;
    }

    #sidebar1 li {
        
    backgroundurl(images/img11.jpgno-repeat left bottom;
    }

    #sidebar1 li ul {
        
    backgroundurl(images/img10.jpgrepeat-y left top;
    }

    #sidebar1 li li {
        
    backgroundurl(images/img08.gifno-repeat 0 13px;
    }

    #sidebar1 li h2 {
        
    height25px;
        
    padding-top15px;
        
    backgroundurl(images/img09.jpgno-repeat left top;
        
    color#333333;
    }

    .
    sidebar {
        
    floatleft;
        
    width220px;
        
    padding10px 0 0 0;
        
    font-size12px;
    }

    .
    sidebar ul {
        
    margin0;
        
    padding0;
        list-
    stylenone;
    }

    .
    sidebar li {
        
    padding0 0 20px 0;
    }

    .
    sidebar li ul {
    }

    .
    sidebar li li {
        
    margin0 10px 0 15px;
        
    padding8px 0px 8px 20px;
        
    border-bottom1px #B5B5B5 dashed;
        
    backgroundurl(images/img08.gifno-repeat 0 13px;
        
    text-alignleft;
    }


    .
    sidebar li h2 {
        
    height30px;
        
    margin0 0 0 0;
        
    padding8px 15px 0px 35px;
        
    backgroundurl(images/img07.jpgno-repeat left top;
        
    font-size12px;
        
    color#FFFFFF;
    }

    .
    sidebar a {
    }

    /* Search */

    #searchform {
        
    margin0;
        
    padding0 0 0 0;
    }

    #searchform br {
        
    displaynone;
    }

    #searchform h2 {
    }

    #s {
        
    margin10px 0px 0 15px;
        
    padding2px 2px;
        
    width180px;
        
    height18px;
        
    border1px solid #949494;
        
    background#FFFFFF;
        
    font-size10px;
        
    color#000000;
    }

    #x {
        
    margin0;
        
    padding2px 5px;
        
    height25px;
        
    background#CA8186;
        
    text-decorationnone;
        
    text-transformuppercase;
        
    font-familyArialHelveticasans-serif;
        
    font-size10px;
        
    color#CCCCCC;
    }
    /* Calendar */

    #calendar_wrap {
        
    padding0 15px;
        
    text-aligncenter;
    }

    #calendar_wrap table {
        
    width100%;
    }

    #calendar_wrap th {
    }

    #calendar_wrap td {
    }

    #calendar_wrap tfoot td {
        
    bordernone;
    }

    #calendar_wrap tfoot td#prev {
        
    text-alignleft;
        
    font-weightbold;
        
    bordernone;
    }

    #calendar_wrap tfoot td#prev a {
        
    bordernone;
    }

    #calendar_wrap tfoot td#next {
        
    text-alignright;
        
    font-weightbold;
        
    bordernone;
    }

    #calendar_wrap tfoot td#next a {
        
    bordernone;
    }

    /* Footer */

    #footer {
        
    width940px;
        
    height70px;
        
    margin0 auto;
        
    padding-left20px;
    }

    #footer p {
        
    margin0;
        
    padding25px 0 0 0;
        
    text-alignleft;
        
    font-sizesmaller;
    }

    #footer a {
    }

    #footer .link {
        
    floatright;
    }

    #footer .copyright {
        
    floatleft;

    This is my index.html
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <
    head>
    <
    meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <
    title>title</title>
    <
    meta name="keywords" content="" />
    <
    meta name="title" content="" />
    <
    link href="default.css" rel="stylesheet" type="text/css" media="screen" />
    </
    head>
    <
    body>
    <!-- 
    start header -->
    <
    div id="header">
        <
    div class="left" id="logo"></div>
      <
    div id="menu">
      <
    ul id="main">
                <
    li class="current_page_item"><a href="index.html">Homepage</a></li>
                <
    li><a href="movies.html">All Movies</a></li>
                <
    li><a href="genres.html">Genres</a></li>
                <
    li><a href="downloads.html">Downloads</a></li>
                <
    li><a href="contact.html">Contact Us</a></li>
          </
    ul>
      </
    div>
        
    </
    div>
    <!-- 
    end header -->
    <
    div id="wrapper">
        <!-- 
    start page -->
        <
    div id="page">
        <
    div id="page-bgtop">
        <
    div id="page-bgbtm">
            <
    div id="sidebar1" class="sidebar">
                <
    ul>
                    <
    li>
                        <
    h2>Recent Posts</h2>
                        <
    ul>
                            <
    li></li>
                            <
    li></li>
                            <
    li></li>
                            <
    li></li>
                            <
    li></li>
                            <
    li></li>
                            <
    li></li>
                            <
    li></li>
                            <
    li></li>
                            <
    li></li>
                        </
    ul>
                    </
    li>
                    <
    li>
                        <
    h2>GenreS</h2>
                        <
    ul>
                            <
    li><a href="genres/action.html">Action</a></li>
                            <
    li><a href="genres/comedy.html">Comedy</a></li>
                            <
    li><a href="genres/drama.html">Drama</a></li>
                            <
    li><a href="genres/family.html">Family</a></li>
                            <
    li><a href="genres/holidays.html">Holidays</a></li>
                            <
    li><a href="genres/horror.html">Horror</a></li>
                            <
    li><a href="genres/sci-fi.html">SCI-FI</a></li>
                            <
    li><a href="genres/war.html">War                </a></li>
                            <
    li><a href="ipod.html">Ipod</a></li>
                        </
    ul>
                    </
    li>
                </
    ul>
            </
    div>
            <!-- 
    start content -->
            <
    div id="content">
                <
    div class="flower"></div>
                <
    div class="post">
                    <
    h1 class="title"><a href="#">Welcome to Our Website!</a></h1>
                    <
    class="byline">&nbsp;</p>
                    <
    div class="entry">
                  <
    p>&nbsp;</p>
    <
    class="links">&nbsp;</p>
                    </
    div>
                </
    div>
                <
    div class="post">
                    <
    h2 class="title">Good Luck and Have Fun!</h2>
                </
    div>
            </
    div>
            <
    div id="sidebar2" class="sidebar">
                <
    ul>
                    <
    li>
                        <
    form id="searchform" method="get" action="#">
                            <
    div></div>
                        </
    form>
                    </
    li>
                    <
    li> </li>
                </
    ul>
            </
    div>
            <!-- 
    end sidebars -->
            <
    div style="clear: both;">&nbsp;</div>
        </
    div>
        </
    div>
        </
    div>
        <!-- 
    end page -->
    </
    div>
    <
    div id="footer">
        <
    class="copyright">&copy;&nbsp;&nbsp;2009 All Rights Reserved &nbsp;&bull;&nbspDesign by Bas de Vries
    </div>
    </
    body>
    </
    html

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,672
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello flyingdutch16,
    Your box model is off. That works for heights as well as widths.
    You have:
    #header set at 960x150
    Inside #header you have:
    #logo set at 960x100
    #menu set at 960x52
    That's a total height of 152px wich makes the menu drop below the header by 2px which is what your floated left column bumps up against.

    You can see this very obviously if you put a different background color on each element.

    To fix it, remove the height from header and let it flow on it's own to enclose it's contents.
    Like this -
    Code:
    #header { 
        width: 960px; 
        margin: 0 auto; 
    background: #f00;
    }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •