[thelist] (no subject)

Mark Cheng mark.cheng at ranger.com.au
Tue Nov 6 22:22:54 CST 2001


Hi Chris,

Using CSS, the . is the class selector.  listing classes or tags with no
separator means it will only apply if that sequence occurs in your code.

Therefore

div p {Will apply this style to all p tags within a div, but not p in body}


> .sidebar UL {
>          BORDER-LEFT-COLOR: #9999cc; BORDER-BOTTOM-COLOR: #9999cc;
> BORDER-TOP-COLOR: #9999cc; BORDER-RIGHT-COLOR: #9999cc
> }
> Does this only work with ULs within a sidebar class?
>

Correct

> .sidebar .container {
>          PADDING-RIGHT: 5px; PADDING-LEFT: 8px; PADDING-BOTTOM:
> 5px; COLOR:
> #ffffff; PADDING-TOP: 5px
> }

Apply the style to any tag with container class (eg <span class="container")
if it is contained in tag with class sidebar.

Therefore <p class="sidebar"><span class="container> picks up the style ...
BUT
<body> <div class="container"> doesn't

>
> .sidebar .ib TABLE {
>          BORDER-LEFT-COLOR: #9999cc; BORDER-BOTTOM-COLOR: #9999cc;
> BORDER-TOP-COLOR: #9999cc; BORDER-RIGHT-COLOR: #9999cc
> }

so in this case the .sidebar .ib is the same as the example above.  The
trick here is that the style only applies to the Table tag.  Therefore to
get this to work you need

<div class="sidebar"><div class="ib"><table>etc.

Note that you don't need to use div tags - I just used that for convenience.

hth

MarkC


This email may be confidential and contain commercially sensitive information.  Only the intended recipient may access or use it.  If you are not the intended recipient please delete this email and notify us promptly. 
We use virus scanning software but exclude all liability for viruses or similar in this email or any attachment.






More information about the thelist mailing list