HighDots Forums  

Trying to understand CSS

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Trying to understand CSS in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jetski
 
Posts: n/a

Default Trying to understand CSS - 11-04-2004 , 11:58 AM






:confused; When I create a full Style Sheet and under 'body' specify Georgia,
Times New Roman (etc.) 9 points, the pages I apply the style sheet to don't
seem to recognise the font-size instruction although they are using the
specified font. If I right-click on body text and select CSS style, 'None' is
checked. If no special CSS class is specified, shouldn't the page be displaying
with ALL the parameters set in the 'body' definition?


Reply With Quote
  #2  
Old   
Thierry Koblentz
 
Posts: n/a

Default Re: Trying to understand CSS - 11-04-2004 , 12:00 PM






Times New Roman should be "Times New Roman"
and you shouldn't use "points", but %, em or pixels

HTH,
Thierry

jetski wrote:
Quote:
confused; When I create a full Style Sheet and under 'body' specify
Georgia,
Times New Roman (etc.) 9 points, the pages I apply the style sheet to
don't seem to recognise the font-size instruction although they are
using the specified font. If I right-click on body text and select
CSS style, 'None' is checked. If no special CSS class is specified,
shouldn't the page be displaying with ALL the parameters set in the
'body' definition?



Reply With Quote
  #3  
Old   
David Stiller
 
Posts: n/a

Default Re: Trying to understand CSS - 11-04-2004 , 12:03 PM



jetski,

When you say "apply the style sheet to," do you mean that you're linking
an external style sheet to these other pages? If this style sheet is
external (that is, a CSS file ... something.css), then each page must have a
<link> tag that points to it.

In theory, yes ... if you have an element selector (something like body
{ ... }), then everything inside that body should pick up all the properties
specified. It is possible, though, that tags inside your body, such as
<div>, <span>, <td>, etc., have other styles that override the font-size
property.

With a little more information, the answer might just pop into place.
Can you post a URL?


David
stiller ( at ) quip ( dot ) net



Reply With Quote
  #4  
Old   
David Stiller
 
Posts: n/a

Default Re: Trying to understand CSS - 11-04-2004 , 12:05 PM



Quote:
and you shouldn't use "points", but %, em or pixels
This is because different browsers interpret differently what a given
point size is.


David
stiller ( at ) quip ( dot ) net




Reply With Quote
  #5  
Old   
jetski
 
Posts: n/a

Default Re: Trying to understand CSS - 11-04-2004 , 12:32 PM



I should clarify that I used the font set from DW's dropdown menu so yes,
'Times New Roman' is in quotes, I just didn't bother to include that in my
post. You seem to be saying that font-size won't be recognized if it's not in
%, pixels or em, but I use points in other style classes and they render fine.
I'm just not clear why the specification in the 'body' definition is being
ignored.


Reply With Quote
  #6  
Old   
Marcello Cerruti
 
Posts: n/a

Default Re: Trying to understand CSS - 11-04-2004 , 12:42 PM



Quote:
:confused; When I create a full Style Sheet and under 'body' specify Georgia,
Times New Roman (etc.) 9 points, the pages I apply the style sheet to don't
seem to recognise the font-size instruction although they are using the
specified font. If I right-click on body text and select CSS style, 'None' is
checked.
This is because the contextual CSS Styles menu retrieves just the classes you have set in your stylesheet, like the Style menu in the Properties inspector.
Though you can check the applied styles directly in the page just having a look at the page displayed in Dreamweaver (Design View). You can also inspect all the styles form the Relevant CSS panel, insideTag panel group.

Quote:
If no special CSS class is specified, shouldn't the page be displaying
with ALL the parameters set in the 'body' definition?
It should work this way, but many browsers (IE PC in first instance) do not inherit in table td and th the styles set for the body tag. That's why Dreamweaver MX 2004 insert a multiple selectors rule when editing body styles form the Page Propeties dialog box.
body,td,th {
ecc. ecc.
}
instead if you set the body tag rules from the tag radiobutton of the CSS editor they will be set just for the body tag
body {
ecc. ecc.
}
Of course if you select the advanced radiobutton you can insert by yourself the above mentioned multiple selector, by tiping in the Selector field by typing the following:
body,td,th

Marcello cerruti


Reply With Quote
  #7  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Trying to understand CSS - 11-04-2004 , 12:47 PM



.oO(jetski)

Quote:
I should clarify that I used the font set from DW's dropdown menu so yes,
'Times New Roman' is in quotes, I just didn't bother to include that in my
post. You seem to be saying that font-size won't be recognized if it's not in
%, pixels or em,
They are recognized, but interpreted differently. When using pt for
screen stylesheets the results are unpredictable across different
browsers and operating systems.

pt only makes sense for printer stylesheets. For screen use em or %, px
is also possible, but causes accessibility problems in IE.

Quote:
I'm just not clear why the specification in the 'body' definition is being
ignored.
The reason could be anything, it's impossible to say without seeing the
code. The best would be an URL and some details about which browsers you
used. And before posting make sure HTML and CSS validate, it makes no
sense to search for errors in invalid code.

http://validator.w3.org/
http://jigsaw.w3.org/css-validator/

Micha


Reply With Quote
  #8  
Old   
Marcello Cerruti
 
Posts: n/a

Default Re: Trying to understand CSS - 11-04-2004 , 12:50 PM



Quote:
You seem to be saying that font-size won't be recognized if it's not in
%, pixels or em, but I use points in other style classes and they render fine.
No the problem with points is just that is a paper documents unit measure, it just don't fit perfectly with monitor needs, so they should be used just for print stylesheets.
Of course you can use points, but i would suggest to use pixels, or - a better choice - should be
* setting a font size of 101% for the body
* applying specific different font size for other elements, setting them in em.

Marcello cerruti


Reply With Quote
  #9  
Old   
jetski
 
Posts: n/a

Default Re: Trying to understand CSS - 11-04-2004 , 01:36 PM



What David says about <td> and other tags overriding the 'body' style seems to
be the answer. I tried creating a new page, linking the style sheet to it, and
typing some text. It picked up the style just fine. Then I inserted a table and
typed some text into a table cell, and presto - no style.


Reply With Quote
  #10  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Trying to understand CSS - 11-04-2004 , 01:45 PM



It's not an override. It's the failure to inherit into those tags. And it's
a browser thing, I believe.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"jetski" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
What David says about <td> and other tags overriding the 'body' style
seems to
be the answer. I tried creating a new page, linking the style sheet to it,
and
typing some text. It picked up the style just fine. Then I inserted a
table and
typed some text into a table cell, and presto - no style.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.