Home page edits cascading through all pages
-
I changed my home page recent posts so that the date would be inline with the title, but that is causing all the paragraphs to disappear on all pages. I don’t know why this is happening, since I’m using a unique id item for the home page. Here is the code I used:
#recent-excerpts h4, p { display: inline; }
I’ve added .home and other variations to no avail, and if I try to specify back to block display on the other pages (using #article) I don’t get anywhere. I’m using the Opti theme.
Thanks!
The blog I need help with is: (visible only to logged in users)
-
OK, I sort of solved this, which was to use “inline-block” instead of “inline.” However, in most of my posts this added an extra <p> between paragraphs. Hmmm …
-
-
More or less, thanks. My fix (using inline-block) has put an extra <p> in my posts, so if you have any ideas about that, I’m all ears. But it’s manageable for now.
-
We can actually target just the home page, and just that particular widget by preceding the CSS selector with “.home” like the following. Notice that I also added #recent-excerpts before the “p” so that it targets only p elements in #recent-excerpts. I also included .home before that selector as well.
.home #recent-excerpts h4, .home #recent-excerpts p { display: inline-block; }The “home” class is set in the opening HTML body tag for the home page and is useful in targeting that particular page. Also, each page has a unique page id class in the opening HTML body tag.
-
Oh, that’s brilliant, thanks! I had used .home before with no effect, but you’ve made it work by putting .home before both h4 *and* p, as well as adding #recent-excerpts to both. Thanks again.
-
- The topic ‘Home page edits cascading through all pages’ is closed to new replies.