The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> ul and li stles within .class
Dbosch
post Sep 25 2007, 04:33 PM
Post #1


Member
***

Group: Members
Posts: 56
Joined: 5-June 07
Member No.: 3,000



iwas wandering if there is a way to embed ul style within .class
for example i have .class that i use to format my <div>'s font, alignment, margins etc. but I cant seem to figure out how to assign that class specific ul style. I am trying to increase gap between li items.

I can create separate class for ul but how can i include that class within another class. do i need other class for li as well? basically I have no idea how to solve this if it's doable.
thanks in advance.

This post has been edited by Dbosch: Sep 25 2007, 04:55 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 25 2007, 05:22 PM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Well, to increase space between the li elements, you need to specify margin (or possibly padding) for the li elements. But you can select based on the class of the ul element:
CODE
ul.classname li { margin : ... }
or you can select based on the class of an element that contains the ul element:
CODE
.classname ul li { margin : ... }
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dbosch
post Sep 25 2007, 05:29 PM
Post #3


Member
***

Group: Members
Posts: 56
Joined: 5-June 07
Member No.: 3,000



QUOTE(Darin McGrew @ Sep 26 2007, 12:22 AM) *

Well, to increase space between the li elements, you need to specify margin (or possibly padding) for the li elements. But you can select based on the class of the ul element:
CODE
ul.classname li { margin : ... }
or you can select based on the class of an element that contains the ul element:
CODE
.classname ul li { margin : ... }



thanks I'll try that. I wasnt specifying li after ul.class
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Sep 26 2007, 08:37 AM
Post #4


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



QUOTE(makhmalee @ Sep 25 2007, 11:51 PM) *
why are you using any class for ul and li.
Presumably, to distinguish ul elements that serve one purpose from ul elements that serve other purposes. It's the normal way to use the class attribute.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 09:09 PM