This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > August 2006 > Properties that apply within a particular div only





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Properties that apply within a particular div only
malachi.constant@gmail.com

2006-08-15, 6:45 am

Hi,

I'm creating a page with various sections using <div>, and want some
particular formatting properties to apply only in a certain section but
not the whole page (for example, in a navigation column using form
dropdowns I want to set the list menu background color but only for
lists within that <div> )

How do I define formatting within a particular section ?

Rik

2006-08-15, 10:35 pm

malachi.constant@XXXXXXXXXX wrote:
> Hi,
>
> I'm creating a page with various sections using <div>, and want some
> particular formatting properties to apply only in a certain section
> but not the whole page (for example, in a navigation column using form
> dropdowns I want to set the list menu background color but only for
> lists within that <div> )
>
> How do I define formatting within a particular section ?



--HTML--
<div id="some_name">
<ul>
<li>foo</li>
<li>bar</li>
</u>
</div>
<ul>
<li>foo</li>
<li>bar</li>
</u>

--CSS--
#some_name ul{
background-color: lime;
}
-------

Check the different options for selectors, there is really a lot possible.

Grtz,
--
Rik Wasmus


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews