HighDots Forums  

Newbie - Overiding Background.

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Newbie - Overiding Background. in the Cascading Style Sheets forum.



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

Default Newbie - Overiding Background. - 08-23-2007 , 08:42 PM






Hi All,

I am attempting to override the background of a list item on my sidebar.
In my css the sidebar li is defined as:
#sidebar li li {
padding: 0;
padding-left: 15px;
background: url(images/img04.gif) no-repeat left center;
font-size: .75em;
}

I try to override the background property using:
..UserList {
padding: 0;
background: none;
padding-left: 15px;
background: none;
font-size: .75em;
}

But if I use
<li class="UserList">....</li>
It doesnt work.

Any pointers?

Regards

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

Default Re: Newbie - Overiding Background. - 08-23-2007 , 09:04 PM






On Fri, 24 Aug 2007 03:42:17 +0200, Mick Walker <mick.walker (AT) privacy (DOT) net>
wrote:

Quote:
Hi All,

I am attempting to override the background of a list item on my sidebar.
In my css the sidebar li is defined as:
#sidebar li li {
padding: 0;
padding-left: 15px;
background: url(images/img04.gif) no-repeat left center;
font-size: .75em;
}

I try to override the background property using:
.UserList {
padding: 0;
background: none;
padding-left: 15px;
background: none;
font-size: .75em;
}

But if I use
<li class="UserList">....</li
It doesnt work.

Any pointers?
specificity & the cascase...

#sidebar li li.Userlist{} would work

http://www.w3.org/TR/CSS21/cascade.html#specificity
--
Rik Wasmus


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.