![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Anyway, I'm attempting to write a style sheet, and have read various sources describing how to do them and set them out. Whether I'm completely stupid or whether it's simply because I haven't been able to ask someone about it, I'm still not sure how the hell a style sheet should look. I'm attempting to create a sheet to use externally, mainly to set out my background and text. |
#3
| |||
| |||
|
|
So, spefically, I'm wondering a few things. The first is, when I've looked at the link command used to attach an external sheet, the instructions say to place the link in the <head> section, thusly: link rel="stylesheet" type="text/css" href="filename.css" I get the HREF tag, but as in this example the TYPE tag is "text/css", does this mean there are other types of... well, types? What exactly does this specify? Is it telling the computer to expect a stylesheet written in a text form or what? I'm also assuming the LINK REL is telling the computer to expect/read the file as a stylesheet. |

|
The other thing I'm wondering is exactly how a stylesheet should be laid out when being written. I've looked at a few sheets, and have seen it done in varying ways that confuse me. My most recent attempt contained the fields BODY (containing specs for background color, text color, font family), .BOX (containing specs for box alignment, box height & width, border color/width/style, margin, and background pattern). All the definitions were contained with the braces brackets { }, as I've seen exampled and implemented in others' sheets. What am I missing? Is there anything else I should be specifying? If not, then why the hell didn't it work when I wrote HTML for my front page and stuck the link ref in the header?!?!?! :-) |
#4
| |||
| |||
|
|
There are rules, and then there are conventions. Conventions are things like capitalizing HTML elements like BODY and P, making classes and ids lowercase (.class or #id), and putting excessive whitespace, tabs, or newlines in to make it more readable. That sort of stuff is optional. [snip] |
![]() |
| Thread Tools | |
| Display Modes | |
| |