View Single Post
Old 11-07-2012, 10:45 AM   PM User | #5
LearningCoder
Regular Coder

 
LearningCoder's Avatar
 
Join Date: Jan 2011
Location: The Pleiades
Posts: 849
Thanks: 67
Thanked 28 Times in 28 Posts
LearningCoder is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
You can’t put list items inside anchor elements. Anchor is an inline element and list items are block-level elements, and block-level elements can’t go in inline elements. The other way around is possible, though.
Thanks for your reply. I have given my list items a style of display: inline so that they display horizontally. I have seen many examples of this when looking at CSS Menu's which you can download from sites. As I say, I'm not sure if this is correct or whatnot. I've not got much time, but I will play around with that tonight and see what the results are.

Quote:
Originally Posted by VIPStephan
That said, it’s really you choice which element you use for styling, especially with fonts which are inherited by children. I usually go from outside to inside, i. e. I style the outermost element(s) first and if some children require special treatment I style those.
Thank you for the advice, I wasn't aware children inherit styles from outside elements, although now you have brought it up, it has been staring me in the face as even setting font styles on a div set the child elements to that very same font...doh!

As I say, I'll play around with it tonight and let you know the results, I've only ever created a menu where the anchor has been the outermost element of any list items.

Kind regards,

LC.
LearningCoder is offline   Reply With Quote