WordPress.org

Support

Support » Themes and Templates » LOST in some simple CSS

LOST in some simple CSS

  • ThorHammer
    Member

    @thorhammer

    I am developing a theme with main content to the left and one sidebar to the right. But my sidebar doesnt align next to the content, but to the right of my window.
    Here is the troublesome CSS:

    #wrapper {
    	margin:0px auto 0px auto;
    	height: auto:
    	width: 880px;
    	text-align: left;
    	background-color: #ffffff;
    }
    #detail_listing_surround {
    	padding: 5px;
    	float: left;
    	height: auto;
    	width: 690px;
    	border: 1px solid #000000;
    }
    #sidebar {
    	float: right;
    	width: 180px;
    	text-align: left;
    	font: normal 11px 'Lucida Grande', Verdana, Arial, Sans-Serif;	margin:0x 0px 0px 10px;
      	padding: 0px 5px 0px 10px;
      	background-color: #ffffff;
    
    }

    And here is the template file…

    <body>
    <div id="wrapper">
    
    <div id="sidebar">sidebar</div>
    
    <div id="detail_listing_surround">
    All my stuff..............</div></div>

    Please..I am going nuts….

Viewing 6 replies - 1 through 6 (of 6 total)
  • CSS gives me fits. I understand it but hunting a simple little fix drives me nuts.

    Maybe,

    #Sidebar
    fload: left (right now it’s floating right)

    ThorHammer
    Member

    @thorhammer

    Nope.. when its declared to left, it appears as a LEFT sidebar, correctly aligned, but it is supposed to be a RIGHT sidebar…

    Is there a link where we can look at what is troubling you?

    ThorHammer
    Member

    @thorhammer

    Hi!
    No, this is on my local xammp. But the problem lies somewhere in the code mentioned above. But I just cant see where and why myself.

    Try it the other way around:

    <body>
    <div id="wrapper">
    
    <div id="detail_listing_surround">
    All my stuff..............
    </div>
    
    <div id="sidebar">sidebar</div>
    
    </div>

    and make #sidebar float: left;

    That way you ‘pile’ your floats from left to right. Some believe that content before links/navigation is better for SEO, so that would be a nice advantage as well.

    Peter

    ThorHammer
    Member

    @thorhammer

    Thanks, I will think about it! By the way: I solved the issue when I cleared left in detail_listing_surround…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘LOST in some simple CSS’ is closed to new replies.