Home :: PigPog gets its first CSS

I’ve finally gone for using some CSS on PigPog. I’ve not seen the point for a long time, but recently it’s been having problems showing the correct fonts in Mozilla Firefox. Since that’s the browser I use almost all the time now, that’s a bit upsetting. Some bits of the site randomly seem to turn themselves back into Times New Roman, and headings just don’t work in other parts. I presume there’s a font tag somewhere that I’ve failed to close, but I couldn’t find it.

Anyway, it turned out to be much easier to sidestep the problem by switching to style sheets than to fix it. I added a CSS file, gave it the default settings to use for paragraphs, added a couple of exceptions – the navigation section on the left, and the taglines in white at the top, and all the problems just went away.

The reason that finding the lost font tags was harder than it should be is that each PigPog page is made up of several files. The actual file that is opened includes instructions to include another four files, in order to make it easier to modify chunks of the site at once – changing where the navigation links point to, changing colours, changing logos, and such like. The front page also includes three other files for the various sections. So there’s really seven files to go through to correct all the fonts on the front page – CSS takes that problem away completely.

It actually gets more complex than that for building the pages – the taglines are stored in a seperate text file, with some code to grab a random line from it. There’s another three files used to build the bit at the bottom of each page that tells you how it was created. Oh, and the front page also has to read my blog, Sam’s blog, and the Articles ‘blog’ to get the titles of the latest of each of them. So there’s actually 14 files used just to generate the HTML page that gets sent to the browser. That’s before anything starts grabbing images…

Tip Jar

Liked this post? Leave a tip - $1, or send multiple if you like!