HighDots Forums  

CSS Question

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss CSS Question in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
A.M
 
Posts: n/a

Default CSS Question - 01-01-2004 , 10:26 PM






Hi,

What does this style do?

<style type="text/css">
* {font: 9pt Arial, sans-serif}
</style>


Thanks,
Ali



Reply With Quote
  #2  
Old   
dave
 
Posts: n/a

Default Re: CSS Question - 01-01-2004 , 11:30 PM






I think that would give you a syntax error.

believe it should be

{
font-family:Arial, sans-serif;
font-size:9px;
}

what is "*" ? don't believe that is a valid tag.

A.M wrote:
Quote:
Hi,

What does this style do?

style type="text/css"
* {font: 9pt Arial, sans-serif}
/style


Thanks,
Ali



Reply With Quote
  #3  
Old   
DiMa
 
Posts: n/a

Default Re: CSS Question - 01-02-2004 , 12:15 AM



A.M wrote:
Quote:
Hi,

What does this style do?

style type="text/css"
* {font: 9pt Arial, sans-serif}
/style
The asterisk (*) is called the "universal selector". What it does is tell every
element in the document to have the style which follows. So this particular
style {font: 9pt Arial, sans-serif} will tell every element to be a 9pt font of
Arial or sans-serif.

However, not that pts are not a unit of measurement for the web. They are a
print unit.


--
--
DiMa
--------------------
WEB FORUM USERS: Please log on to the Newsgroup for quicker replies to
your posts: news://forums.macromedia.com/macromedia.dreamweaver
For Answers, check here first:
http://groups.google.com/advanced_gr....dreamwea ver
http://www.macromedia.com/support/dr...technotes.html
http://www.projectseven.com/faqbase
http://www.dreamweaverFAQ.com

http://www.macromedia.com/support/forums/etiquette.htm

www.flyingtigerwebdesign dot com






Reply With Quote
  #4  
Old   
DiMa
 
Posts: n/a

Default Re: CSS Question - 01-02-2004 , 12:23 AM



dave wrote:
Quote:
I think that would give you a syntax error.

believe it should be

{
font-family:Arial, sans-serif;
font-size:9px;
}
Dave -

This is shorthand and perfectly acceptable. The rule for shorthand font is:

{font: font-style font-variant font-weight font-size/line-height font-family}

Therefore:

{font: bold small-caps 12-x/1.5 Arial, Verdana, sans-serif;}

The only 2 required for this shorthand are font-size and font-family.

So you can do this: {font: 12px Arial}
But not this: {font: 12px;} or this: {font: Arial;}

--
--
DiMa
--------------------
WEB FORUM USERS: Please log on to the Newsgroup for quicker replies to
your posts: news://forums.macromedia.com/macromedia.dreamweaver
For Answers, check here first:
http://groups.google.com/advanced_gr....dreamwea ver
http://www.macromedia.com/support/dr...technotes.html
http://www.projectseven.com/faqbase
http://www.dreamweaverFAQ.com

http://www.macromedia.com/support/forums/etiquette.htm

www.flyingtigerwebdesign dot com






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

Default Re: CSS Question - 01-02-2004 , 02:07 AM



Does this short hand validate with w3c css standards?


DiMa wrote:

Quote:
Dave -

This is shorthand and perfectly acceptable. The rule for shorthand font is:

{font: font-style font-variant font-weight font-size/line-height font-family}

Therefore:

{font: bold small-caps 12-x/1.5 Arial, Verdana, sans-serif;}

The only 2 required for this shorthand are font-size and font-family.

So you can do this: {font: 12px Arial}
But not this: {font: 12px;} or this: {font: Arial;}

--
--
DiMa
--------------------
WEB FORUM USERS: Please log on to the Newsgroup for quicker replies to
your posts: news://forums.macromedia.com/macromedia.dreamweaver
For Answers, check here first:
http://groups.google.com/advanced_gr....dreamwea ver
http://www.macromedia.com/support/dr...technotes.html
http://www.projectseven.com/faqbase
http://www.dreamweaverFAQ.com

http://www.macromedia.com/support/forums/etiquette.htm

www.flyingtigerwebdesign dot com





Reply With Quote
  #6  
Old   
DiMa
 
Posts: n/a

Default Re: CSS Question - 01-02-2004 , 02:38 AM



dave wrote:
Quote:
Does this short hand validate with w3c css standards?
Absolutely. Shorthand is just as valid as long hand.

--
--
DiMa
--------------------
WEB FORUM USERS: Please log on to the Newsgroup for quicker replies to
your posts: news://forums.macromedia.com/macromedia.dreamweaver
For Answers, check here first:
http://groups.google.com/advanced_gr....dreamwea ver
http://www.macromedia.com/support/dr...technotes.html
http://www.projectseven.com/faqbase
http://www.dreamweaverFAQ.com

http://www.macromedia.com/support/forums/etiquette.htm

www.flyingtigerwebdesign dot com






Reply With Quote
  #7  
Old   
Alex Marino
 
Posts: n/a

Default Re: CSS Question - 01-02-2004 , 11:30 AM



DiMa,

Learn something new everyday ... whether I want to or not.

* ... cool!

alex


"DiMa" <diana (AT) YOURHATANDCOATflyingtigerwebdesign (DOT) com> wrote

Quote:
A.M wrote:
Hi,

What does this style do?

style type="text/css"
* {font: 9pt Arial, sans-serif}
/style

The asterisk (*) is called the "universal selector". What it does is tell
every
element in the document to have the style which follows. So this
particular
style {font: 9pt Arial, sans-serif} will tell every element to be a 9pt
font of
Arial or sans-serif.





Reply With Quote
  #8  
Old   
A.M
 
Posts: n/a

Default Re: CSS Question - 01-02-2004 , 12:25 PM



So the right solution for my prvious post:

http://groups.google.ca/groups?q=Glo...a.com&rn um=1

Is *, isn't it?

Thanks,
Ali



"A.M" <I-Hate-Spam (AT) sapm (DOT) com> wrote

Quote:
Hi,

What does this style do?

style type="text/css"
* {font: 9pt Arial, sans-serif}
/style


Thanks,
Ali





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

Default Re: CSS Question - 01-02-2004 , 02:15 PM



Alex Marino wrote:
Quote:
DiMa,

Learn something new everyday ... whether I want to or not.

* ... cool!
Hey Alex! Long-time-no-see!

--
--
DiMa
--------------------
WEB FORUM USERS: Please log on to the Newsgroup for quicker replies to
your posts: news://forums.macromedia.com/macromedia.dreamweaver
For Answers, check here first:
http://groups.google.com/advanced_gr....dreamwea ver
http://www.macromedia.com/support/dr...technotes.html
http://www.projectseven.com/faqbase
http://www.dreamweaverFAQ.com

http://www.macromedia.com/support/forums/etiquette.htm

www.flyingtigerwebdesign dot com






Reply With Quote
  #10  
Old   
DiMa
 
Posts: n/a

Default Re: CSS Question - 01-02-2004 , 02:21 PM



A.M wrote:
Quote:
So the right solution for my prvious post:


http://groups.google.ca/groups?q=Glo...e&hl=en &lr=&
ie=UTF-8&oe=UTF-8&selm=bra3ao%24nau%241%40forums.macromedia.com&rn um=1
Quote:
Is *, isn't it?
If you don't care about NN 4.x, then yes, it should work. But do bear in mind
that there was something else going wrong with your code in that post, which is
why I requested an URL

What darrel suggested should work, too.

body, table, td, div, p {font....}

....is correct. If it doesn't carry the font-size to all specified elements then
something else in the page is screwing with it somehow. Could you post the code
here or show the URL?

--
--
DiMa
--------------------
WEB FORUM USERS: Please log on to the Newsgroup for quicker replies to
your posts: news://forums.macromedia.com/macromedia.dreamweaver
For Answers, check here first:
http://groups.google.com/advanced_gr....dreamwea ver
http://www.macromedia.com/support/dr...technotes.html
http://www.projectseven.com/faqbase
http://www.dreamweaverFAQ.com

http://www.macromedia.com/support/forums/etiquette.htm

www.flyingtigerwebdesign dot com






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 - 2008, Jelsoft Enterprises Ltd.