CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 3rd, 2004, 07:42 PM
chrisab508 chrisab508 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 67 chrisab508 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Don't understand this CSS

okay, so i was trying to accomplish the same thing as the website www.alistapart.com I wanted the same thing for the links up at the top, i achieved this by looking at this websites CSS file.

this was teh relevant CSS code:

PHP Code:
#menu UL {
    
BORDER-TOP-WIDTH0px
                
CLEARleft
                
PADDING-RIGHT0px
                
PADDING-LEFT0px
                
BORDER-LEFT-WIDTH0px
                
BORDER-BOTTOM-WIDTH0px;
                
PADDING-BOTTOM0px
                
MARGIN0px
                
PADDING-TOP0px
                LIST-
STYLE-TYPEnone
                
TEXT-ALIGNcenter
                
BORDER-RIGHT-WIDTH0px
}
#menu UL LI {
    
PADDING-RIGHT0px
                
DISPLAYblock
                
PADDING-LEFT0px
                
FLOATleft
                
PADDING-BOTTOM0px
                
MARGIN0px
                
PADDING-TOP0px;
                
TEXT-ALIGNcenter
}
#menu UL LI A {
    
PADDING-RIGHT0px;
                
BORDER-TOP#ccc 1px solid;
                
DISPLAYblock
                
PADDING-LEFT0px;
                
FONT-WEIGHTnormal
                
FONT-SIZEx-small;
                
BACKGROUND#fff; 
                
PADDING-BOTTOM0px
                
MARGIN0px 0px 10px
                
BORDER-LEFT#ccc 1px solid;
                
WIDTH118px;
                
COLOR#c30; 
                
LINE-HEIGHT2em
                
PADDING-TOP0px
                
BORDER-BOTTOM#ccc 1px solid; 
                
BORDER-RIGHT-STYLEnone
                
LETTER-SPACING1px;
                
HEIGHT2em
                
TEXT-ALIGNcenter;
                
TEXT-DECORATIONnone;
                
voice-familyinherit;



lol so it accomplishes what im looking for but i don't understand WHY it does this.

Any help would be great!

thanks.

Last edited by chrisab508 : February 3rd, 2004 at 07:47 PM.

Reply With Quote
  #2  
Old February 3rd, 2004, 07:50 PM
chrisab508 chrisab508 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 67 chrisab508 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
what i mainly don't understand about it is: the links are typed in as a list in the HTML, so how does this get them horizontal?

thanks.

Reply With Quote
  #3  
Old February 4th, 2004, 01:53 AM
OCB OCB is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Lyon, France
Posts: 49 OCB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Try reading the alistapart website some more. It's probably the worlds best one-stop-shop for webdesign tutorials & articles and a great way to start learning CSS.

They actually have an entire article (called 'taming lists') that explains in detail what the above css does...

Read my friend... read..

Reply With Quote
  #4  
Old February 4th, 2004, 08:19 AM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,685 Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 4 Weeks 6 h 6 m 4 sec
Reputation Power: 594
they are using FLOAT: left;
on the li-element to get them on one line

you can achieve a similar effect by using display:inline on the li-elements,

then they use display:block on the anchor elements, so that they can set width and height to those elements.


http://www.alistapart.com/articles/taminglists/

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Don't understand this CSS


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway