Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   [SOLVED] Adjusting margins for one specific page? (http://forum.bytesforall.com/showthread.php?t=19480)

mcphoto Jan 27, 2013 12:43 PM

[SOLVED] Adjusting margins for one specific page?
 
Hey guys - brand new ATA & WP install:

http://agepureathletics.com/test/

I've got this set up for a different layout on the home page (page-id-6). So things like removing the headline, etc, are fine: body.page-id-6 .post-headline {display: none;} - works fine. However, the three content boxes and headlines should be in one line - the padding or margin is making them jump to 2 lines. You can see there's 10px or so padding on the left.

I have the center column set up for 10px margin on the left via the post-container controls - I'll need that margin for the other pages. But I need no padding or margins on the home page (ID 6). I can't shut it off for one page either in post container or center column.

I've tried a lot of stuff via firefox. It seems like the selector I need to override is either "post-bodycopy" or td ID "middle". I've tried a lot of variants - I'm guessing my problem is I can't find the proper way to address that td.

"body.page-id-6 .post-bodycopy " works - (I added background #ccc in testing to make sure and the BG did change), but that selector doesn't seem to control the margins/padding. If it's that one TD, I don't know the proper syntax when including a page ID - can't find an example anywhere. basically need to say via CSS, on "page ID 6, no margins or padding left/right on the center column". (And I REALLY firebugged & searched!!)

I've also got a weird thing - if you roll over the "about us" page link, you see the drop down pages. I have them set for a graphic BG and a rule below. but the rule only appears when rolling over the child page link. Seems odd to me, but I'm not totally 2nd nature with CSS.

Thanks for any help - I'll buy someone a cocktail for this one!!!

Code I have in inserts right now for the margins issue:

HTML Code:

#middle td.page-id-6 {padding: 0px 0px 10px 0px; !important;
margin-left:0px !important;
margin-right:0px !important;
background: #ccc !important; }

body.page-id-6 .post-bodycopy {
margin-right:0px !important;
margin-left:0px !important; }


lmilesw Jan 27, 2013 01:07 PM

To get the boxes all in one line you will either need to make the width of the boxes or the margins for the columns smaller.

Your menu dropdowns look good to me.

mcphoto Jan 27, 2013 01:20 PM

Nope, that's not the case - if I remove the 10px post-container padded in the theme controls, it displays perfectly in one line. With one pixel to spare in fact. (thought that was clear in my OP?)

But I need that padding for other pages - I just need to remove it on page ID 6. I can't find what selector to address - as stated above, it seems like that td ID. post-bodycopy doesn't do it.

lmilesw Jan 27, 2013 01:40 PM

Part of my confusion is I couldn't find the padding that was causing the problem and then I realized you were talking about margins. How about the following.
HTML Code:

body.home .page {
    margin-left: 0 !important;
}

body.home in this case is the same as body.page-id-6

mcphoto Jan 27, 2013 03:27 PM

Ha! That did it. And it works with page ID as well, saved that for future ref. It's handy when you want, say, a video gallery page or something that's right up to the edges.

Your avatar should be "I don't always drink beer, but when i do I'm surrounded by asian supermodels!"

Anyway, donated - forgot to enter my forum ID in paypal - thanks, I'd torn out too much hair to keep guessing on this one!


All times are GMT -6. The time now is 07:24 AM.

Powered by vBulletin® Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.