WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] CSS help needed to resize column (8 posts)

  1. wordsnyc
    Member
    Posted 5 years ago #

    I am using a lightly-modified version of the Blue Zinfandel theme on my site http://www.word-detective.com. As you can see, each post has Adsense code at the end. The center column is 478 px wide, the text margins 440 px wide. At the moment, I can only fit 234 x 60 text ads there, but I'd like to fit 468 x 60 image ads there. The margins/padding screw that up.

    Is there a way to keep the margins as-is for text and somehow turn off the margins around the ad code? Or is there a better way to fiddle with the width of the center column without screwing up the page layout?

    Thanks for any help.

  2. moshu
    Member
    Posted 5 years ago #

    Is there a way to keep the margins as-is for text and somehow turn off the margins around the ad code?

    No.

    Or is there a better way to fiddle with the width of the center column without screwing up the page layout?

    Re-designing the theme.

  3. boober
    Member
    Posted 5 years ago #

    why cant you just adjust the margins and padding in that center content area? im sure it would look fine with less. just tweak these two sections of your css

    #contentmiddle {
    
    	float: left;
    
    	width: 440px;
    
    	margin: 0px 0px 0px 0px;
    
    	padding: 20px 20px 10px 20px;
    
    	display: inline;
    
    	}
    
    #contentmiddle p img{
    
    	float: left;
    
    	border: none;
    
    	margin-right: 15px;
    
    	margin-bottom: 10px;
    
    	}
  4. wordsnyc
    Member
    Posted 5 years ago #

    I changed the left and right padding from 20 to 10 px, and it fits, but it looks off-center. Any lower than that and the text is too close to the column edge. It looks best with text ads, so maybe I'll let it ride without image ads.

    Thanks.

  5. wordsnyc
    Member
    Posted 5 years ago #

    ps -- The second block you cited above doesn't seem relevant, as it applies to images I post, not ads served by javascript, right?

  6. boober
    Member
    Posted 5 years ago #

    the second part would effect any images you add, including image ads. Maybe the text ads too, I'm not familiar with how those are. But you see it gives them a right margin of 15 so it would indeed make it look off center.

  7. boober
    Member
    Posted 5 years ago #

    oh, and make sure you are changing the correct parts of the padding. The four values go clockwise, starting at the top. So the right and left sides are the second and fourth values.

  8. wordsnyc
    Member
    Posted 5 years ago #

    Gotcha -- that's one of the few bits of css I've learned. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic