[SOLVED] Unable to change individual page background w/ body.page-id-
Hello, thank you all for your help.
I've done lots of searches on this forum to find the answer to my problem, but I have not found the answer. So here's my question. My blog currently has different background images for the homepage and the posts. Recently I have installed a forum on my site and I want to give the forum a unique background color. I am using 'Simple Press' as the forum software if that matters at all. I inserted this code in the CSS Insert without success; body.page-id-7242 { background: #999999; } I'm using W3 Total Cache, but I have disabled the cache for the forum page. The forum page also uses a custom page template, so it doesn't display the widgets, header, and footer. I used this code for the template; <?php /** Template Name: Page with background only */ ?> <html> <head> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> <style type="text/css"> body { background-color: #cccccc; } #page-content { width: 1024px; margin: 1px auto } #page-content p { font-size: 13px; font-family: sans-serif; line-height: 1.5em; text-align: justify; } </style> <title><?php wp_title( '|', true, 'right' ); bloginfo('name'); ?></title> <?php wp_head(); ?> </head> <body> <?php while (have_posts()) : the_post(); ?> <div id="page-content"> <?php the_content(); endwhile; ?> </div> </body> </html> I tried changing the background from the template as well, but it hasn't worked. Can anyone help me set a different background color for my forum page? |
What version of Atahualpa and WP?
What is the URL pointing to the issue? try 'background-color: #999999;' |
Sorry about that, I forgot to include those information.
http://kpopfever.com/forum/ Atahualpa 3.6.7 WordPress 3.2.1. I just tried color #999999 in the CSS insert and it hasn't worked. Thank you. |
the template is not including a class in the <body> which is why the css doesn't apply. try changing the <body> to
HTML Code:
<body class="page-id-7242"> set yourself up with a 'playground' install of WP and Atahualpa. a place where you can mess around and not cause a problem. Put an install (with a new DB) in a subfolder, call he folder 'playground' or something |
Thank you juggledad, your solution worked.
I agree with you about learning CSS properly. I've been putting it off for months now, because I have to spends so much time on the contents of my sites, but you are right I should learn it. So anyways, thank you. |
All times are GMT -6. The time now is 04:57 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.