Tags: overrides


CSS problems fixed

Fantastic. Now that I know I can (in CSS) override elements within elements without needing to specify class names, I've fixed my GLOBAL_HEAD CSS so that the page scrolls faster, and the style doesn't look like crap in browsers that don't support CSS. (In those that don't, you'll see a maroon background, black border and white content area, just as it should be.)

I've managed to cut down my override code by a third, and most of my colour values are back to normal. I'm happy now.

More on overrides and stylesheets

It's amazing what you can find wallowing in the vast treasure-trove of information spread around LiveJournal. Through reading the LJ Support Guide, I found a link to a gem of a discussion thread on free style customisation and overrides, which linked to the most inspiring support walkthrough I have ever seen.

macheide is my new God.

Style customisation

For a free account, there's a hell of a lot you can do to customise a basic style. I'm impressed with the results, as you probably will be, but shattered: I've just been through the ordeal of overriding the style of this journal, Punquin w/sidebar, to the absolute limit. And boy, does it play hell with some of the techniques I used.

Now, in an ideal world all major HTML elements in all LiveJournal styles would have a CSS class or ID associated with it, so you can simply manipulate them to your heart's content in a stylesheet placed in the GLOBAL_HEAD override. Unfortunately, Punquin wasn't designed with this concept in mind, so I had to think of another way to do what I wanted to do.

And then it hit me: maybe I could insert arbitrary code into the colour values of my journal. If instead of white I put white" class="something, it would be stuck in a set of inverted commas as normal and would give me two perfectly formatted attributes as a result.

My initial tests went well, but the way LJ parses the colour value is somewhat erratic. I don't know how it's done - maybe somebody with an understanding of the code could enlighten me? - but in some cases it played merry hell with the HTML.

Punquin decided to be even more weird by behaving differently on the New Entries page from all other pages, and its Friends page is designed so as not to let you override FRIENDS_TALK_LINKS or FRIENDS_TALK_READLINK. So much for that. I managed to work around the different treatment of pages by overriding a couple of style attributes in the CALENDAR_HEAD, FRIENDS_HEAD and DAY_HEAD overrides.

Everything now looks great on any recent browser which handles CSS semi-decently. If your browser doesn't support Cascading Style Sheets, this journal will mostly look like crap. Sorry.