The ISA-Bus

One blog to bind them all.

Style sheets override HTML tags

I verified this in Internet Explorer 6.0, Firefox 3.6 and even a very old version of Opera, 8.5 from 2001, which I still use for email: When there are conflicting instructions for background colors or images in style sheets and HTML tags, then the style sheet instruction will override the one in the HTML tags. This can be used to advantage.

When I designed Download Central, I did not want it to be too dependent on style sheets. They define only the font, justify the margins of paragraphs and handle a few details. The background images of the pages, and the white background of the table that contains the text, are defined in the HTML tags. This ensures that a browser that does not support style sheets (Arachne, for example) will still display the pages approximately as intended.

As I have now verified, if I ever wanted to set all the pages to a single background image, or change the table color, either temporary or permanently, I could do so by just adding the appropriate instructions to the style sheet. And I could revert to the status quo ante any time by removing them again, or commenting them out.



Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: