Space Cadets
Star Map

missed.a.previous.lesson?.go.here

atom




Astro Lesson #27:
she.sells.style.sheets.by.the.sea.shore

We had to drag Retrogrrl screaming to this week's lesson as she seemed to have developed some strange phobia towards the topic we picked out for her. Funnily enough, once we released her from the electrophobic-displacer anti-matter chair, she said, "Actually, these Cascading whatsits might not be too bad after all, in fact they could catch on". Mamma mia, what a Grrrrrrrrl!

in.the.name.of.style

Cascading Style Sheets. CSS. With a stupid name like that no wonder they scare people off. Shoulda been called something much simpler, such as plain ol' Styles or Style Links or somesuch. Anywho, here's what they are all about - in future lessons we shall delve into all the bits and bobs associated with using them, but it's a large area to cover, and getting Retrogrrl to sit still long enough to write one of these things is a nightmare.

mr.cranky.pants

HTML, dear HTML - how we love it so : it's mean, it's cruel, it's unforgiving and yet we bow down to its whimsies and grovel to its demands. Dare we complain about its rigidity? Should we mention its reluctance to put things on a web page where WE might actually like them to be? Can we possibly say that HTML is *gasp* a workhorse and not a prancing pony??? Well, yes actually, we can and we will.

HTML was designed, as mentioned in another space and time, to get things out there on the net, not to make 'em look prissy and nice. Problem is, we like things to look prissy and nice so we tweak that code and whip it in to shape whenever we can. We add tags to better handle fonts, colors, layout et al, but this can involve a lot of work - especially on sites that have many pages... change something on one page and chances are you'll want to update all the others as well. This can cause an unpleasant headache and turn you into Mr Cranky Pants.

retrogrrl.says

With CSS things are looking up. It is now possible to change, say, a font color, once and have it change on every page. Yes, really - but you don't believe us? Too good to be true? Well, actually it isn't all plain rocketeering just yet.

Style Sheets are not supported by all browsers ( now isn't that a familiar tale of woe? ) and those that do understand the deal can't agree as how to display different CSS 'properties', for goodness sakes! IE 3 started the ball rolling, but IE4 and NN4 haven't got their acts together. At this stage, it's just not reliable enough for us plain folk to put into full operation. However, if we don't start learning about it and practising with it, we is gonna be left out in hyperspace, sucked into a time whorl and dragged into the dimension that time forgot. That's why you NEED to start now. And don't argue with Retrogrrl, she knows what she's talking about - well, sometimes anyway...

between.the.sheets

Style Sheets are not really sheets at all. As a matter of fact, they are specifications that tell a browser how to display your content - so they keep the display bit apart from the content bit - just like in a wordprocessing package. They also come in 4 flavours

Embedded - the CSS 'instructions' live inside the page itself, hiding inbetween the head tags.
Inline - they live inside the page but they're not hiding, rather they are right in with all the other HTML code, directly next to whatever it is they are talking about
Imported - not from a foreign land, but from a document nestling somewhere about the place with a .css extension, containing all the required info.
Linked - the best and most efficent kind this simply 'links' to a document nestling somewhere about the place with a .css extension etc etc. Let's face it, if all this CSS stuff is mainly to help you avoid repeating code and cut down on file size and work, then this is the way to go.

cascade.parade

This is where the Cascading bit comes into it. Say you went crazy with CSS and had most of your pages 'linked' to a style sheet, but you wanted to use embedding in a particular page, and within that page you decided to sneak in a smidgeon of inline CSS - how would the browser know what to look at first? Which type of CSS would be most important? How do they all play follow the leader?

Retrogrrl thinks the HTML boffins went a bit ga-ga in throwing in the name 'cascading', but we suppose they were thinking of a kinda waterfall effect, trickling down through the ranks. What they really mean is that there are 'hierarchical' or 'tiered' or 'stepped' or 'ranked' or 'multi-level' (we could go on with better descriptions but we decline) rules that browsers are supposed to adhere to when this circumstance arises. Once again, however, we are not bound for the promised land - this does not work so perfectly either.

Oh well.

So, that's it. Not so scary, huh? Next time we get Retrogrrl strapped to the chair, we'll make her demonstrate the real thing and show you how they look and work. But that's on another orbit.
next pod copyright.wendy.phillips.1998-2000

 


(The Retro City neurometer is reading that your brain is now full)
Remember, Space Cadets! This is a basic guide only - go read the manual.

back.to.space.cadets.lounge
Space Cadets


 

retro city