Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » Forum Usage » Forum How-To »

[SOLVED] Styling the homepage differently than the single page

Old Mar 24, 2011, 03:29 AM
2 posts · Dec 2010
How do I apply a styling that affects only the homepage elements and not the single page? For instance, I want to add a border above and below a post container in the homepage but I don't the borders to appear in the singe post view. How do I do that?
Old Mar 24, 2011, 06:18 AM
juggledad's Avatar
23,759 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you will need to add CSS Selectors and CSS rules to do the styling. You can prefix any selector with 'body.home' so to have a border around a post on the home page you would use
HTML Code:
body.home .post {border: solid 2px red;}
A great tool to use if you don't already, is FireBug in FireFox so you can see the existing CSS for an element in the HTML
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
Old Mar 24, 2011, 07:10 AM
2 posts · Dec 2010
Thanks Juggledad. I do use FireBug but I was not aware of the body.home stuff. Thanks again.


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Style each post differently by category lisyan Center area post/pages 15 Jan 21, 2011 08:03 PM
Permalink in single post and single page anup Center area post/pages 0 Jul 15, 2010 10:46 AM
KICKER: Homepage %category-linked"% causes right sidebars to disappear from homepage Jazoja Post-Kicker, -Byline & -Footer 2 Jun 23, 2010 06:32 PM
Widgets page and plug ins add page not working, and displaying differently shamrock 2000 Sidebars & Widgets 10 Feb 16, 2010 05:19 PM
[SOLVED] Body styling only in homepage peking Header configuration & styling 2 Oct 3, 2009 06:11 PM

All times are GMT -6. The time now is 04:23 PM.

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