Quarter Life Crisis

The world according to Sven-S. Porst

« HerringMainMemory »

CSS Magic

444 words

Recently I played a bit with CSS. I started using the Blue Robot's samples and took it from there. This site was the first I tried and then did the site for our department's open day and along exactly the same lines our working group's site.

Only now, a few weeks later, I was told that the pages display strangely in IE 6/Win, which always forces you to scroll horizontally and doesn't fit all of the text into the window. The fact that it took a while to actually realise this was encourageing, showing that most people I know aren't using Windows (IE/Mac displayed the page page correctly) or are using 'alternative' browsers. This afternoon, I finally took the time to look into this quirk and adjust the CSS, so it works everywhere.

Although I think my understanding of CSS has improved through all this, not all of it is entirely clear yet. For example: What exactly do lengths you specify in percentages mean? Sometimes the answer to it seems pretty straigtforward but sometimes it doesn't work the way I think it should. For example when trying to specify a width and height in proportion to the window size, the result seems to only depend on the window's width and not on it's height. Not quite what I expected. Also, I still haven't figured out how to make the right part of this page cover the whole right part of the window, i.e. cover all of the grey area up with the white background and make the dashed line extend all the way to the bottom of the window - reliably in all browsers with no unnecessary scroll bars thrown in, that is.

On a more cheerful note, I discovered the capabilites of using style sheets for different media. Now that is extremely neat. Our Seminar Pages now print out without the navigation bits on them. It's extremely useful and very easy to do.

I also stumbled into another neat use of CSS to hide banner ads and similar annoyances. It seems to be working pretty well, for example to filter any image with doubleclick.net in its URL. The only site I saw it failing on so far was Dilbert. Taking a closer look at it, the page contains very strange JavaScript code that looks like they're trying to hide something.


<!-- BEGIN ENHANCED CREATIVE -->
<script>
document.write ('<SCR'+'IPT language="JavaScript1.1"
[...]
document.write ('<\/SCR' + 'IPT>');

This just looks like they're trying to be particularly moronic. Anyway, the ads display in the end. Does that mean that CSS aren't applied in all their glory to to every element of the page?

December 8, 2002, 18:29

« HerringMainMemory »

Comments on

Photos

Categories

Me

This page

Out & About

pinboard Links

♪♬♪

Received data seems to be invalid. The wanted file does probably not exist or the guys at last.fm changed something.

People

Ego-Linking