Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Stripping DIV from Category Page (http://forum.bytesforall.com/showthread.php?t=21052)

BywayWriter Oct 24, 2013 05:10 PM

Stripping DIV from Category Page
 
My CSS styling for a DIV used on a post is messing with the layout of the category page (listing posts in that category). I'd like to have the date written over an image on each post. The issue is that the date then shows up in the site header on the category page. Is there a way to have Atahualpa strip the DIV from the category page? Sorry, it is an internal site, so can't provide links.

CSS
Code:

#wu-img-container
{
    height:96px;
    width:598px;
    position:relative;
}
#wu-image

    position:absolute;
    left:0;
    top:0;
}
#wu-date
{
    z-index:100;
    position:absolute;   
    color:#757575;
    font-size:22px;
    font-weight:bold;
    font:copperplate gothic bold;
    left:345px;
    top:32px;
}

The DIV
Code:

<div id="wu-img-container">

<a href="http://url.org"> <img id="wu-image" alt="Weekly Update" src="http://img-url.org" /></a>
<p id="wu-date">October 21, 2013</p>
&nbsp;

</div>


juggledad Oct 24, 2013 06:04 PM

Since each page has a class in the <body...> html, you can always target the CSS to the div on that page by using 'body.page_id_nn' as the prefix of your css (nn is the ID number for the page.

note: if it is on the blog page, you use 'body.home'

BywayWriter Oct 29, 2013 11:43 AM

Is there any way to do the opposite of targeting by page and omit the CSS from certain pages? This is a section that gets new posts weekly and would require too much CSS-upkeep to continually add new IDs.

juggledad Nov 1, 2013 05:24 AM

sure, have a general css selector/rule to turn it off followed by a specific css selector/rule to turn it on for the pages you want it


All times are GMT -6. The time now is 11:47 PM.

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