[SOLVED] Post Title Colour
I've been through the search and although there are plenty of options for altering the colour globally I can't find anything that allows me to change the title of a specific post.
I have an important announcement to make and I'd like the title in red so it doesn't get missed. I don't want all of the posts to have their titles in red. Just this one. I'd like it changed on the main page and the individual post's page. I've tried putting the color command html (?) in the title box and it changes the colour OK but also adds in the original grey version and some extra characters which is messy and I don't understand why it does it. eg. <span style="color: #ff0000;">blah blah blah</span> That didn't work. I've also seen the CSS inserts thing but I have no idea what they mean nor how to execute their intent. I don't know anything about the CSS concept structure. I used to be a machine code programmer not a high level wizard. Any clues ? It's driving me bonkers. Atahualpa 3.4.9 www.hampshireskeptics.org |
Not sure about changing just the one post's title - I'm sure there is a way though but you could make the post 'Sticky' and then style the box the post sits in at
Appearance / Atahualpa Theme Options / Style Posts & Pages / Post Container: Sticky Would that work? I know it would keep the post at the top but you could make it 'Not Sticky' at some point in the future when everyone knows... |
The CSS rule would be 'color: #00ffff;' to make the text a bright blue, so how to construct the CSS Selector?
You need to specify the CSS selector so it points at the post. you do this by looking at the generated code. HTML Code:
<div class="post-1538 post type-post hentry category-events category-hampshire-skeptics category-sitp category-urgent" id="post-1538"> HTML Code:
a {color: #00ffff;} HTML Code:
h2 a {color: #00ffff;} HTML Code:
div h2 a {color: #00ffff;} HTML Code:
div.post-headline h2 a {color: #00ffff;} ID's are unigue on a page, ie an ID can only be used once on a page (classes can be used all over) so now you could use HTML Code:
div#post-1538 div.post-headline h2 a {color: #00ffff;} since there is only one post with the ID of 'post-1538' this selector should only apply to one post title. |
I knew it would be something like that!!
|
Thanks Juggledad. That makes complete sense.
But let me tell you where I am so you can see what I mean. Imagine I ask someone for help to make my car go faster. Someone provides me with a box to make it go faster. They explain how the box works. I understand it all. Power in, things happen to it that I understand and make sense and then the increased power comes out the other end of the box. All above board, internally consistent and completely understood. But I'm standing there next to my car that I understand completely and with a box in my hand that I understand completely and I have no idea how to make the box fit to the car. Where does it go ? The code makes sense, the logic is perfect, the exposition of why this way will work is logically consistent and without flaw that I can detect. The solution appears whole and eminently suitable for the job. But where does it go ? I can't see anywhere to put it. See what I mean ? That's part of my problem with high level languages in general actually. It's almost as if they've been "poofed" into existence and are hovering in codespace without support. I can understand them internally but cannot for the life of me understand how they can do anything at all. 6502 and Z80 8 bit CPUs if you're wondering. Thanks guys. |
sorry, it goes in Ato->Add HTML/CSS Inserts->CSS Inserts
Nicely put cry for help :) |
Ahhhhh. Gotcha.
So things entered in that box appear to be a little like CSS interrupts in that whatever is entered in there overrides whatever is supposed to be controlling the formatting ? It works fine on the main page but goes back to black on the post page I get to by clicking the post title on the main page. Although this isn't really a problem as the information is highlighted where it needs to be which is where most people will see it. Thanks for your help. |
Ahh that's because on a single post page the post title becomes an h1 so use this
HTML Code:
div#post-1538 div.post-headline h1, |
Ah ! Of course.
I didn't realise about the different heading sizes. Thanks Juggledad. |
Ummmm.
Can't get it to work. I've added in more lines with h3 h4 and h5 as well and no change. Any ideas ? http://www.hampshireskeptics.org/?p=1538 |
Sorry I had a typo in post #8 - I just fixed it. Try that out.
|
Apologies for not coming back sooner.
That works perfectly. Thanks for the help. |
All times are GMT -6. The time now is 08:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.