CSS stylesheet with * attribute

CSS stylesheet with * attribute

am 15.08.2007 12:06:01 von Qbert

I am using this stylesheet :

* {font-family:verdana;font-size:15px}
#ta{font-size:30px;color:red}

With the #ta class i want to make my table's text look red and big.

...

Bad thing: only the red color shows up, font-size stays as defined in
*
What am i doing wrong?
Thanks,
Karl

Re: CSS stylesheet with * attribute

am 15.08.2007 12:15:40 von Dylan Parry

qbert@gmx.at wrote:
> I am using this stylesheet :
>
> * {font-family:verdana;font-size:15px}
> #ta{font-size:30px;color:red}
>
> With the #ta class i want to make my table's text look red and big.
>

...

IIRC, some browsers (specifically IE) have problems with styles defined
for tables. You may find that changing "#ta" to "#ta td, #ta th" helps
as that specifically applies styles to the cells (and header cells)
within the table, not just the table itself.

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

The opinions stated above are not necessarily representative of
those of my cats. All opinions expressed are entirely your own.

Re: CSS stylesheet with * attribute

am 15.08.2007 12:24:19 von Qbert

> for tables. You may find that changing "#ta" to "#ta td, #ta th" helps
> as that specifically applies styles to the cells (and header cells)

Thanks!
This works.

Re: CSS stylesheet with * attribute

am 15.08.2007 18:37:30 von cfajohnson

On 2007-08-15, qbert@gmx.at wrote:
> I am using this stylesheet :
>
> * {font-family:verdana;font-size:15px}
> #ta{font-size:30px;color:red}
>
> With the #ta class i want to make my table's text look red and big.
>

...
>
> Bad thing: only the red color shows up, font-size stays as defined in
> *
> What am i doing wrong?

You have set every element to 15px (which is the wrong way to do
it; use relative sizing), unless it is specifically changed.
Elements will not inherit font-size from the containing element.

Since you cannot use text directly in a
element, the 30px
will not affect anything. You need to apply the styling to the
cells that contain text,
and .

--
Chris F.A. Johnson
============================================================ =======
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)

Re: CSS stylesheet with * attribute

am 16.08.2007 00:12:52 von jkorpela

Scripsit qbert@gmx.at:

> I am using this stylesheet :
>
> * {font-family:verdana;font-size:15px}
> #ta{font-size:30px;color:red}

Sorry, but it's all wrong. Read a good tutorial on CSS _now_.

(All settings are wrong: using Verdana, setting font-size in pixels, and
setting color without setting background - and pure red is seldom a feasible
color for text.)

> With the #ta class i want to make my table's text look red and big.

Stop wanting that.

>

...
>
> Bad thing: only the red color shows up, font-size stays as defined in
> *

The "*" selector (not an attribute) selects all elements. So you are setting
font-size to 15px for all elements, including td elements (table cells). The
rule with #ta overrides this _only_ for the specific element (the table
element) that has id="ta". Setting font-size for a table does not directly
affect anything. It might affect elements inside the table via inheritance,
but here no inheritance of font-size takes place, since you have set
font-size for all elements.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Re: CSS stylesheet with * attribute

am 16.08.2007 04:43:52 von dorayme

In article ,
"Jukka K. Korpela" wrote:

> ... pure red is seldom a feasible
> color for text.)

A web page on the "Galileo of Graphics" breaks out the red paint:

http://www.edwardtufte.com/tufte/

--
dorayme

Re: CSS stylesheet with * attribute

am 16.08.2007 05:40:06 von mbstevens

dorayme wrote:
> In article ,
> "Jukka K. Korpela" wrote:
>
>> ... pure red is seldom a feasible
>> color for text.)
>
> A web page on the "Galileo of Graphics" breaks out the red paint:
>
> http://www.edwardtufte.com/tufte/
>

What a huge disappointment (but thanks for posting it).
His books actually have a lot of useful information.

But on that web page the 'Forum Topics' are hard to read
and should be bulleted, or at least separated by a
little space from each other, and the validator is having
a major Red Bull rage over the thing. I can only hope it's
more of a publisher thing over which that he didn't have sufficient
control.

As to the red links, I don't really have a huge objection, but
middle red is not the way to go. The red should be toned down
toward black a bit.

Re: CSS stylesheet with * attribute

am 16.08.2007 05:54:16 von dorayme

In article <13c7hllaqu4472@corp.supernews.com>,
mbstevens wrote:

> dorayme wrote:
> > In article ,
> > "Jukka K. Korpela" wrote:
> >
> >> ... pure red is seldom a feasible
> >> color for text.)
> >
> > A web page on the "Galileo of Graphics" breaks out the red paint:
> >
> > http://www.edwardtufte.com/tufte/
> >
>
> What a huge disappointment (but thanks for posting it).
> His books actually have a lot of useful information.
>
> But on that web page the 'Forum Topics' are hard to read
> and should be bulleted, or at least separated by a
> little space from each other, and the validator is having
> a major Red Bull rage over the thing. I can only hope it's
> more of a publisher thing over which that he didn't have sufficient
> control.
>
> As to the red links, I don't really have a huge objection, but
> middle red is not the way to go. The red should be toned down
> toward black a bit.

I have no disagreement with any of this. I particularly agree
about the darker red being more appropriate for text if reddish
it is to be.

--
dorayme

Re: CSS stylesheet with * attribute

am 16.08.2007 06:03:55 von mbstevens

dorayme wrote:

>> As to the red links, I don't really have a huge objection, but
>> middle red is not the way to go. The red should be toned down
>> toward black a bit.
>
> I have no disagreement with any of this. I particularly agree
> about the darker red being more appropriate for text if reddish
> it is to be.
>
....at least if it's going to float on a white background, for contrast.