December 30th, 2002


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.

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.


You'll notice I was listening to David Gray when I wrote my last entry. If you want to check him out (and I highly recommend you do) you can watch a webcast of his special Christmas Eve concert at any point before the 21st of January or thereabouts.

Want more? Go and see him.
  • Current Music
    Theory Of A Deadman - Make Up Your Mind
  • Tags