![]() Tactical Panda
|
Cascading Style Sheets (2)More Specific CSSYou can detail the way you want the fonts to behave on the page by being more specific about what you want to see. Here is an example of what I mean: font-weight: medium;
The above coding can be used instead of the line: ...but is obviously more 'focused' on what you want. CSS can also dictate the heading commands (<H1>, <H2> etc), like this the examples below. Headings are normally red (#FF0000), but you can have them any browser-safe colour you want. H1 { color : #FF0000;
H2 { color : #FF0000;
So the entire code now looks like this (assuming you include them all): <style type="text/css">
H1 { color : #FF0000;
H2 { color : #008000;
To show you what all this will do on this page, this is how the text will look: This is a size one heading (H1)This is a size two heading (H2)Coloured Buttons So what about the final (seperate) line? The one that looks like: This is a really clever bit of scripting that helps me overcome the naturally ugly grey buttons on websites by colouring them. Let me explain. If you use a form on your pages, you will have a 'Send' and 'Reset' button somewhere on the page, otherwise the form won't work! It will look something like this: Now I don't know about you, but I think they are ugly, so I colour them, so they look like this: Isn't that better? I thought you may say that. To do this I start with the original coding: Using the CSS code mentioned above, I add the words class="forms" to the coding so it now looks like this: The browser now relates the CSS coding and every time it sees the coding class="forms" it knows it has to change the colour to blue (or whatever colour you choose), and the text colour to white (#ffffff), or whatever you want it to be. You can have green buttons, yellow buttons or red buttons if you want. Experiment with your website and see what is best for you. By the way, did you click one of those buttons above? To add the alert message was easy. Here is the code: Coloured Scroll Bars One of the more popular additions to browsers has been colouring the scroll bars. This is only applicable to the latter versions of Internet Explorer at the moment, but no doubt they will blossom to other browsers sooner rather than later. The coding I use in the <HEAD> section is: <STYLE TYPE="text/css"><!--
The best thing to do is experiment! This website uses the colour #004080 (blue) a lot, so you can see that the scroll bar face is that colour. I have decided the track colour is to be the same colour, and the shadow colour is to black (#ffffff), with the 'shadow' colour to be white (#000000). The arrows at the top and bottom of the scroll bar are also white. Basically, you can use any browser-safe colour that take your fancy! I wouldn't recommend you go too wayward with the colours otherwise you will distract the viewer! Keep it to the same basic colurs as your website for best effect.
|