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)
-   -   Change to colour handling in H1, H2, etc in CSS Inserts. (http://forum.bytesforall.com/showthread.php?t=8703)

coop42 Aug 4, 2010 10:48 AM

Change to colour handling in H1, H2, etc in CSS Inserts.
 
Responding to a previously closed post about H1, H2, etc colour formatting change.

In previous versions, a simple definition of the colour (h1 {color: #FF000; }) in the CSS Inserts was sufficient.

Now we have to add class= to the definition?

So we'd have to code the CSS as...

H1.red { color: #FF0000; }

And then code each of the tags as <H1 class="red"> rather than the simpler <H1>?

That's a bit tedious.

Just curious, was there a particular reason for this, or is it an "unintended consequence" of something else?

Can it go back to the old/simpler way of doing it?

coop

lmilesw Aug 4, 2010 11:28 AM

I just put some code like what you mention in CSS Inserts and then wrapped some text in a page in an h1 tag and all worked as expected. Where did you see that we have to add class= to the definition?

coop42 Aug 4, 2010 11:43 AM

I was referring to the post "[SOLVED] H1, H2, H3 color codes lost in WP 3.0.1". In it the poster (c12281) stated that he/she solved the same problem I was having with colours of the H1, etc by adding class to the CSS.

I had a simple definition of H1 in the CSS inserts, and it didn't change the colour of the header.

h1 {
padding: 0;
margin: 0;
font-size: 1.9em;
line-height: 1.5;
font-weight: normal;
color: #365DA0;
}

and in the page, the code is simply...

<h1>This is the title</h1>

but this has no effect on the colour of the header.

When I changed the CSS in the CSS Inserts to:

h1.colour {
padding: 0;
margin: 0;
font-size: 1.9em;
line-height: 1.5;
font-weight: normal;
color: #365DA0;
}

and the related code in the page to

<h1 class="colour">This is the title</h1>

The colour of the header changed as specified (and as expected). The first CSS doesn't work, the second one does.

coop42 Aug 4, 2010 12:09 PM

OK, that's just weird.

Before lunch, the basic CSS didn't work. Not in IE, FF, Opera, Chrome or Safari.

After lunch, after replacing the class code with the basic code, it worked.

I didn't restart the computer, or even the browsers.

I hate it when that happens.

Arrgh! Now I don't know what the problem was.

juggledad Aug 5, 2010 06:07 AM

do you have a caching plugin active? Never try to develop with a caching plugin active and make sure to delete the cache or your changes may take some time to show up.

coop42 Aug 5, 2010 11:33 AM

Nope, and the effect was the same on my WinXP laptop, a Win7 machine, an iPhone and an iPad.

So it was something very, very odd.


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

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