472,958 Members | 2,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

CSS element question

Hello CSS guru's:
I'm new to CSS and I'm having trouble deciphering markup like this:

#navcontainer ul { margin: 0; } or even this:

#navcontainer ul ul li { margin: 0; }

In the first example, the id #navcontainer is followed by whitespace and another CSS element. In the second example, there are 3 elements that follow the id, which are also separated by whitespace.

In the first example, I assume that the ul that is associated with #navcontainer will have a margin of 0.

But I have no idea what the second declaration means.

My question is, how are elements separated by whitespace in a declaration interpreted?

Any help would be appreciated.
Mar 6 '08 #1
2 1191
Stang02GT
1,208 Expert 1GB
Hello CSS guru's:
I'm new to CSS and I'm having trouble deciphering markup like this:

#navcontainer ul { margin: 0; } or even this:

#navcontainer ul ul li { margin: 0; }

In the first example, the id #navcontainer is followed by whitespace and another CSS element. In the second example, there are 3 elements that follow the id, which are also separated by whitespace.

In the first example, I assume that the ul that is associated with #navcontainer will have a margin of 0.

But I have no idea what the second declaration means.

My question is, how are elements separated by whitespace in a declaration interpreted?

Any help would be appreciated.
kjmaclean,

Welcome to the Scripts! I point you to this site. It provides a lot of good information about CSS with examples and its in a step by step/ chapter like format. So can easily return to where you left off.

Hopefully that site will help you out. I know it helped me a great deal. Enjoy!
Mar 6 '08 #2
drhowarddrfine
7,435 Expert 4TB
#navcontainer ul ul li { margin: 0; }


Any help would be appreciated.
You are correct on the first one. The second can be read as "a <li> contained in a <ul> which is contained in a <ul> which is contained in #navcontainer". So the second <ul> is in a <li> of the first <ul>.
Mar 6 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Wolfgang Lipp | last post by:
my question is: do we need container elements for repeating elements in data-centric xml documents? or is it for some reason very advisable to introduce containers in xml documents even where not...
0
by: Wolfgang Lipp | last post by:
From: Lipp, Wolfgang Sent: Tuesday, 27?January?2004 13:26 <annotation> the first eleven contributions in this thread started as an off-list email discussion; i have posted them here with...
6
by: Wole Ogunremi | last post by:
I guess this is a well asked question but it is tripping me up! I'm putting a forum together allowing xhtml markup content. I am validating against a schema but getting "Could not find schema...
8
by: MENTAT | last post by:
Hi Guys, Newbie question here. Part of my xml looks like this. <node> <description/> <config/> <log/> <transition/> <node>
5
by: Patient Guy | last post by:
In my reading of the Strict and Transitional DTD for HTML 4.0, the table row (TR) elements are contained within table section elements: THEAD, TFOOT, and TBODY. The table section elements are...
21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
0
by: magister | last post by:
Hello, I want to have a unique Quesiton Id key for each question under section. Not for every question in the Typed DataSet. Is there anyway I can do this...? Thanks, here is my typed...
13
by: Jiho Han | last post by:
Here's the issue. You have a class, Class Person { public int id; public string firstname; public string lastname; }
1
by: nayijitu | last post by:
Hi, I need some thing like this. I have an XML file and it contain some elements(tag) with a proper hierarchy... In that XML a particular element <page> contain some child node element like...
4
by: mab464 | last post by:
I have this code on my WAMP server running on my XP machine if ( isset( $_POST ) ) { for($i=0; $i<count($_POST);$i++) { if ($ans != NULL ) $ans .= ", " . $_POST ; // Not the first...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.