
| lotus9 | Nov 7, 2007 3:45am | I've been told that CSS is so convenient and useful but I've been struggling with it ever since I started using Dreamweaver for my web work. So I try to get rid of it because it sometimes interferes with my work especially when I try to change the font sizes. If there is a style sheet attached, it may obstruct my font size selection that I'm trying to do manually. Sometimes I can only change the font size through the CSS that is attached to the page.
If you can just explain the basics of how to use the CSS successfully to this CSS-illiterate, I would be grateful.
Thank you for your patience. |
|
| 
| Mickey-Nox | Nov 7, 2007 1:38pm | im not quite sure exactly what youre asking, but in reference to your font changing issues -
when you tell an html page that it should be pulling its styling from a css sheet, thats exactly what it does. if you want to change the font size or type, you have to do it within the css stylesheet itself, as thats the only place your wysiwyg editor (in this case dreamweaver) is looking. |
|
|  Sponsor | toontje | Nov 7, 2007 2:12pm | CSS is easy to learn, but only if you start at the basics before you implement something without having basic knowledge.
A single document with styles defined for the elements used (style-sheet) can control the looks of your entire website. Meaning you just have to mention / declare them once in your style-sheet and they will affect each and every document that sheet has been linked to.
Lets say you need a specific font and a certain size for each and every document.
In your style-sheet you just put:
body {
font-family: arial, sans-serif;
}
Meaning each and every page the style-sheet is linked in will have for the element < body > a font arial that is part of the family sans-serif. If for some reason a browser doesn't have the font mentioned it will choose a font from the sans-serif family.
All the elements in the body can have a different font if you wish. For example the < p > paragraph element.
We just declare the style in the style sheet as:
p {
font-family: arial, sans-serif;
font-size: 1.2em;
}
Now all the text in each and every < p > element will have the font arial (if present) with the size of 1.2em (1.2 times the size of the letter m of the specified font)
If i want to declare a singel < p > in that page with another size i just give that element a specific class (if it might occure more than once or 'id' if it just occures once)
In the HTML-document it will be placed for example as:
< p class=" exception" >
In the style-sheet you declare the rule for the paragraph as:
p.exception {
font-size: 1.5em;
}
Now all the elements in each and every html-document with the given class exception will have a font with the size of 1.5 times the size of the letter m.
This can be done with all the html-elements that will be placed in the body section, including the body itself.
If you are realy a beginner, have a look at:
htmlhelp.com/reference/css/ [htmlhelp.com/reference/css/] |
|
| 
| heartfm | Nov 8, 2007 6:32am | | toontje, said it all :D |
|
|  | 3807889 | Nov 12, 2007 5:03am | | Dump dreamweaver, get editpad lite, and code it manually. Only then can you have an understanding of css, and rid your pages of tons of useless crap code (and personal headaches) |
|
| 
| |
| 
| lotus9 | Nov 13, 2007 3:56am | Appreciate everyone's kind advice. Thank you.
I usually work in Dreamweaver's "design view" because the code view is very difficult for me. I've only done simple alterations through the code view. |
|
|  Staff | |
| 
| lotus9 | Nov 19, 2007 1:12am | | Thank you George. Will keep that in mind. |
|
| 
| pixelwolf | Jan 12, 2:14am | depending on the version of dreamweaver your using - if cs3/mx get into the preferences and untick the use css instead of html button - then you wont get dreamweaver writing the css in STUPID syles such as,<. style1: stuff in here.>
use the css panel - its not too scary - for font sizes declare your basic font size (in ems is best) in the body (or body tag) selector ....
that should give you a good start - stick with dreamweaver shes a good program but do work split screen -looking at both the code and the design veiw- its not really that scary ,and it will help you get used to looking at code.... good luck
opps i just re read your original post - and i think i understand you are setting font size vai HTML as well as through css - choose one method /preferably css. In theory html is moving away from being a presentation tool, and css is has taken over this task , it really is much better at formatting than html ever was and as a designer you will love it ...eventually (it will save you sooo much time , and even better theres kerning !) theses heaps of good sites to give you a leg up starting with syle sheets - just start simple and keep learning i can garentee you will never look back ... |
| |
| |