Hey hey,
I didn't have time to test the code that I wrote earlier, but it should bring up something similar to what you were getting before if you follow the instructions? Hopefully in a slightly more standards compliant way
For adding the extra styles you initially wanted (I hope I'm getting your request right! I wasn't exactly sure!) then you need to add extra 'Class'es or 'Id's where you want the specific styling to go.
To style an element in the CSS has quite a lot to it, you may want to look up a tutorial, but I'll give you the basics anyhow...
You can style any tag by writing its generic name into the CSS, so:
- Code: Select all
td {color:red;}
body{background-color:black;}
would change all the text in all the tds on the page to red and the background colour to black.
You can style a specific tag(/s) that has a class or id, by putting either a '.' for classes, or a '#' for ids in the css:
- Code: Select all
.someClass {margin-left:20px;}
#someId {width:50%;
background-color:yellow;}
Would change all components with the attribute 'class=someClass', so that they would all get a 20px gap at the left side. And the #someId, would change the component that had 'id=someId' in their tag so that they took up 50% of the screen. It would also make the background color yellow - even if this was in the same style-sheet as the declaration making the background-color black. Styles are inherited by the child components, but they can be over-written, that's why it's called cascading!
You can also mess about with the parent child relationship:
- Code: Select all
td .someClass {padding:4px}
.someClass td {border:solid 2px black}
For the first one all components of the class 'someclass' inside a td element gets some padding. With the second all tds in a component with the class 'someclass' get a solid black border.
Oh, and:
- Code: Select all
A:link {}
A:visited {}
A:active {}
A:hover {}
Will probably come in handy for what you're needing!
I really hope I got the right end of the stick about what you wanted!
Best of luck,
Snow