Forum Moderators: not2easy

Message Too Old, No Replies

css and paragraphs

css and paragraphs

         

meanweaver

3:44 pm on May 12, 2004 (gmt 0)

10+ Year Member



I think i am over looking the obvious, I have text on my page which is layed out with tables, all i want to do is make the text verdana and 12pt. I have an external css which is being read by the page fine as other elements on it work fine, but i can not get the text on the page to read it, The text to start with was not in any tags, i was unable to get it to work so i put in <p> tags, still no luck, below is some elements from my css, it all looks fine to me but i must be missing something as the page does not read it.

body {background:#ffffcc; font-family:Verdana; font-size:12pt}

p {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12pt;
font-style: normal;}

Thanks Ian

stever

4:11 pm on May 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How is the text displaying? Is it your default browser font or is it something different?

Try giving the table cells (or the paragraphs) a class and defining the font in the class, in case the font is being affected by a cascade:

.normaltext {
font : 12pt Verdana Geneva Arial Helvetica sans-serif;
}

Generally it can be quite useful to set some global css at the beginning of a stylesheet:

div, p, td{
font : 12px Verdana Geneva Arial Helvetica sans-serif;
}

Won't mention the use of pts...

meanweaver

5:56 pm on May 12, 2004 (gmt 0)

10+ Year Member



ok things starting to happen now, while i am on the topic of font sizes, the old pages had a font size of "2" but 2 what, what does the browser interpret this as, i must confess i have used this for a long time but that wouldn't in the style sheet, have used 12px now by the way.

Thanks again Ian

aeve

6:42 pm on May 12, 2004 (gmt 0)

10+ Year Member



If I'm not mistaken the html font size values 1-7 are more or less equivalent to the css absolute font size keywords: xx-small ¦ x-small ¦ small ¦ medium ¦ large ¦ x-large ¦ xx-large. The spec seems to allow the browser to make the call on exactly what they mean.

[w3.org...]

Not trusting browsers very much, I generally use a combination of em's and percentages. You might find this thread useful:
[webmasterworld.com...]

thenoodleincident has a pretty comprehensive set of font size test images across different techniques and browsers.

Adam

DrDoc

7:04 pm on May 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



html font size values 1-7 are more or less equivalent to the css absolute font size keywords

However, the actual behavior is very unpredictable and differ from one browser to the other.

meanweaver

10:31 pm on May 12, 2004 (gmt 0)

10+ Year Member



very interesting, Thanks for all the info people.

Regards Ian