stereoroid.com

music, opinion and technology

divides

leave a comment »

I take the previous post back: after playing around with DIVs for a bit longer, I found that the problem wasn’t so much in the use of DIVs in general, but in the way they had been implemented in the WordPress Theme I use. I didn’t create that one from scratch, but modified the “Original WordPress” theme. It had a lot of unnecessary tweaks, such as squeezing the text together, which might have given it a different look but had a negative impact on readability.

I’ve also changed the primary font to Palatino Linotype, but that may not last.The logo over the picture is achieved by using another DIV with the picture as its background, and you can expect the picture to change over time. I’ve also resurrected one of my favourite little PHP tricks: the script to calculate a new light colour on each page load, this time applied to the Sidebar background.

Apart from the known compatibility issues with using tables for layout, I also found it had a negative effect on the way the pages were being displayed. The reader would be stuck with a blank page until all the table content had loaded; because I did not fix the width of the left-hand column ,the browser had to do some calculations on the content before displaying it. I definitely do not want to fix the widths, since I have seen how badly that works on other sites, especially when viewing them on small screens.

The DIV method is a pain to manage if you’re not used to it, but the way it works is fairly straightforward in practice. The main body of the text on the page is in a DIV without “absolute” parameters, just some tweaks to the margins, so the browser does not have to work too hard to lay it out as normal.The right-hand margin is much larger, to allow space for the sidebar, which is given an absolute position at the top right, and a fixed width. If the browser does not understand this, it displays the Sidebar at the bottom.

I can see this happening on limited Internet Explorer browser on my old iPaq (which has survived its near-death experience). It’s not all good news, though, since the margin is recognized and takes up half the tiny screen. More experimentation to follow, possibly involving a script that leaves out some formatting user agent parameters. It’s all go here…

Written by brian t

February 18, 2006 at 1:12 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: