WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Sidebar breaking but CSS looks OK (3 posts)

  1. blacloch
    Member
    Posted 4 years ago #

    Hi guys,

    I am having trouble with my theme breaking and the sidebar going to the bottom. The site is http://www.autocadtrainingblog.com

    Some CSS is below:

    #wrapper {
    	width: 960px;
    	margin-right: auto;
    	margin-left: auto;
    }
    #header {
    	float: left;
    	width: 960px;
    	height: 180px;
    }
    #content {
    	float: left;
    	width: 690px;
    	position: relative;
    }
    #footer {
    	background: url(images/footer.gif) repeat-x top;
    	float: left;
    	height: 81px;
    	width: 100%;
    }
    #post {
    	float: left;
    	width: 690px;
    	padding-top: 20px;
    	padding-bottom: 25px;
    }
    #post h2 {
    	font-size: 18px;
    	color: #38BEF0;
    	margin: 0px;
    	padding: 0px;
    	float: left;
    	width: 500px;
    }
    
    #sidebar {
    	float: right;
    	width: 270px;
    	padding-top: 15px;
    	padding-bottom: 25px;

    Any help would be great.

  2. Peter Boosten
    Member
    Posted 4 years ago #

    our structure is like this:

    <div id=content>
      <div id=post></div>
      <div id=sidebar></div>
    </div

    (left the quotes)

    your content div is 690px, and your post div inside the content div is also 690px, so there's no room left for the sidebar div.

    I think you made a type: 690px vs 960px.

    Peter

  3. blacloch
    Member
    Posted 4 years ago #

    How did I miss that?

    Thanks so much Peter!

    I actually thought I was getting the hang of CSS too.

Topic Closed

This topic has been closed to new replies.

About this Topic