WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Need help with spacing on conent and sidebar (3 posts)

  1. chefhazard
    Member
    Posted 2 years ago #

    Hi everyone!
    I am very new to this whole wordpress thing and I am trying to set some ads up on my blog. I added one to my sidebar widget and it was too wide,I tried tinkering around with the style sheet based off of some other posts I read on the forums here, but I think I'm just making things worse.
    So to be clear, this is what I'm trying to accomplish:
    Making my page wide enough to fit the sidebar ad
    Make my content skinnier so it doesn't run into the sidebar ad
    And bring the whole sidebar ad up a bit so it's not so far down on the page.
    Like I said, I'm new to this and I don't want to screw things up anymore than I already have. My site is http://www.chefhazard.com
    Thanks so much for any help you can offer

  2. csleh
    Member
    Posted 2 years ago #

    Part of this is easy. Go to your stylesheet, look for the code for container, content, and primary/secondary and replace with this:

    #container {float: left;margin: 0 -320px 0 0;width: 100%;}
    #content {margin: 0 320px 0 20px;}
    #primary,#secondary {float: right;overflow: hidden;width: 300px;}

    That fixes the content and sidebar issues. The first ad is 300px wide, so the sidebar will now accomodate that.

    For bringing it up on the page, that's a bit tougher. The div #main has a top-padding of 40px. You can remove that, but it will move the content to be directly under that long thin ad. The best bet is to move the ad code from between the header and main divs, and put into main. I think inside the div role=main, but my browser just got funky and I can't test it. Putting the long ad inside the content area will bring the sidebar up equal, though. Possibly this is in the header template.

  3. chefhazard
    Member
    Posted 2 years ago #

    Thank you so much! That was driving me crazy.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.