Fresh Look To Blog

Relates to CSS Design and Blogging

Since the logs seem to be showing a few visits to this blog, I decided to throw in a bit of style as it was all looking a bit plain. Kept things simple, clear and accessible, but in a hurry I nearly ran into a wall, when I failed to account for the content pane being less than the size of the screen window. Once again DOM came to the rescue in browser Standards Modes, with a simple script to retrieve the height of the window pane and individual div containers:

document.getElementById("id").offsetHeight (for the height of a container)

document.getElementById("id").offsetTop (to get the top pixel position of a container)

Then the container can be resized on the fly as the page loads, or window is resized. The DOM inspector in Mozilla is excellent for working with all the DOM properties and testing scripts that manipulate the document tree quickly and accurately. Don't know how I got by without it now!

I also wanted to apply fixed positioning to the menu, so this property is also added on page load following a browser detection script, since div {position:fixed} does not place the container in the right place in IE - where absolute positioning is assigned instead.

Posted on Friday, Jul 11, 2003 at 02:13:56.

Comments on Fresh Look To Blog (0)

Breadcrumbs Trail

[ Home ] -> TW Blog -> Jul 03 -> Fresh Look To Blog
Site Map

The Severn Solutions website achieves the following standards:

[ XHTML 1.0 ] [ CSS 2 ] [ WAI AA ] [ Bobby AA ]

Page compiled in 0.028 seconds