| | |
Problem with Nesting List
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Dec 2008
Posts: 25
Reputation:
Solved Threads: 0
Not sure whats the cause, but the list won't nest properly
/* CSS Document */
/* Content*/
/* CSS Document */
css Syntax (Toggle Plain Text)
* { margin: 0; padding: 0; } body { background-color:#333333; font-family:Arial, Helvetica, sans-serif; size: 2px; text-align:center; height: 100%; font-size:14px; } div#page-wrap{ width: 900px; /* to be change once finish*/ height: 650px; /* to be change once finish*/ margin: 0 auto; /*margin top to 0 and left to auto*/ } .Banner{ width: 775px; height: 182px; } #ulcontainer { position:relative; top: 0; left: 62px; } #navcontainer ul{ margin: 0; padding: 0; list-style-type: none; } #Resume { background-color: #d9c3d0; text-align:left; margin-left: 63px; margin-right: 63px; border: 1; padding-left: 20px; padding-top: 30px; } #navcontainer li { display:inline; } a:link, a:active, a:visited { display: block; float:left; padding-bottom: 4px; padding-top: 4px; padding-right: 44px; padding-left: 45px; margin-left: 1px; /*the gap between banner and navigation menu.*/ background-color:#000000; color:#FFFFFF; text-decoration: none; } #navcontainer a:hover{ background-color:#000000; text-decoration:none; color:#FF66FF; border:groove; border-color:#FF00FF; } .list { font-weight: bold; }
/* Content*/
html Syntax (Toggle Plain Text)
<body> <div id="page-wrap"> <img src="Images/header.png" alt="Banner" class="Banner" /> <div id="ulcontainer"> <ul id="navcontainer"> <li> <a href="Main Page.html">Home</a> </li> <li> <a href="resume.html">Resume</a> </li> <li> <a href="none">Pics</a> </li> <li> <a href="none">Gals</a> </li> <li> <a href="1">Contact Me</a> </li> </ul> </div> <div id="Resume"> <h3>Qualifications Summary</h3> <ul> <li>sample sampl sample sample</li> <li>sample sampl sample sample</li> <li>sample sampl sample sample </li> <li>sample sampl sample sample</li> <li>sample sampl sample sample</li> <li>sample sampl sample sample</li> <li><b>sample sampl sample sample</b> <ul> <li>sample sampl sample sample</li> <li>sample sampl sample sample</li> </ul> </li> </ul> </div> </div> </body>
Last edited by peter_budo; Mar 21st, 2009 at 3:08 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
•
•
Join Date: Dec 2008
Posts: 25
Reputation:
Solved Threads: 0
Nobody has an idea what the answer is?
//This code should be nested, but it doesn't work
//Output should be like this
//but instead I got is like this:
Anyone know the solution to my problem?
//This code should be nested, but it doesn't work
html Syntax (Toggle Plain Text)
<ul> <li>sample sampl sample sample</li> <li>sample sampl sample sample</li> <li>sample sampl sample sample</li> <li>sample sampl sample sample</li> <li>sample sampl sample sample</li> <li>sample sampl sample sample</li> <li><b>sample sampl sample sample</b> <ul> <li>sample sampl sample sample</li> <li>sample sampl sample sample</li> </ul> </li> </ul>
- Data Here
- Data Here
- Data Here
- Data Here
- Data Here
- Data Here
- Data Here
- Indented Data
- Indented Data
//but instead I got is like this:
- Data Here
- Data Here
- Data Here
- Data Here
- Data Here
- Data Here
- Data Here
- Indented Data
- Indented Data
Anyone know the solution to my problem?
Last edited by peter_budo; Mar 21st, 2009 at 3:09 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Your code is correct. The problem is the * in the css. Particularly the padding. With you've reset the padding of all elements to 0. By default, the browser adds padding-left to the second list. However, you've reset the padding to 0, so the list doesn't get the padding. Delete
css Syntax (Toggle Plain Text)
* { margin: 0; padding: 0; }
padding:0; from the * element css and you'll see your list get padded properly. Lost time is never found again.
- Benjamin Franklin
- Benjamin Franklin
Change your css back to what you had before and then add this:
Adjust the padding to your needs.
css Syntax (Toggle Plain Text)
ul ul{ padding-left:20px }
Last edited by buddylee17; Mar 21st, 2009 at 5:02 pm.
Lost time is never found again.
- Benjamin Franklin
- Benjamin Franklin
![]() |
Similar Threads
- Random Number Problem For Lottery Program (Visual Basic 4 / 5 / 6)
- Unordered list problem in IE, first item displaced (HTML and CSS)
- anyone good with databasing pls help (VB.NET)
- How to use this typedef in nesting class. (C++)
- Navbar Transparency Issue (JavaScript / DHTML / AJAX)
Other Threads in the HTML and CSS Forum
- Previous Thread: how to get links to request save?
- Next Thread: A new css layout based on an image of a layout
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7





