Tutorial 3 - Nested Lists - Step 3 - Remove Padding And Margins
Có thể bạn quan tâm
Listutorial - Step by step CSS list tutorial
Tutorial 3 - Nested lists
Step 3 - Remove padding and margins
- Milk
- Goat
- Cow
- Eggs
- Free-range
- Other
- Cheese
- Smelly
- Extra smelly
Standard HTML lists have a certain amount of left-indentation. The amount varies on each browser. Some browsers use padding (Mozilla, Netscape, Safari) and others use margins (Internet Explorer, Opera) to set the amount of indentation.
To remove this left-indentation consistently across all browsers, set both padding and margins to "0" for the "UL".
Go to Step 4 →
CSS CODE #navcontainer ul { margin: 0; padding: 0; list-style-type: none; } HTML CODE <div id="navcontainer"> <ul> <li><a href="#">Milk</a> <ul> <li><a href="#">Goat</a></li> <li><a href="#">Cow</a></li> </ul> </li> <li><a href="#">Eggs</a> <ul> <li><a href="#">Free-range</a></li> <li><a href="#">Other</a></li> </ul> </li> <li><a href="#">Cheese</a> <ul> <li><a href="#">Smelly</a></li> <li><a href="#">Extra smelly</a></li> </ul> </li> </ul> </div> Other Max Design articles and presentations Associated with webstandardsgroup.orgTừ khóa » Html List Style Padding
-
How To Create Space Between List Bullets And Text In HTML?
-
Styling Lists - Learn Web Development | MDN
-
CSS Styling Lists - W3Schools
-
CSS: Control Space Between Bullet And
- - Html - Stack Overflow
-
CSS/List Styles/margin And Padding Of The List - TAG Index
-
CSS List Styling
-
UL Margin Left And Padding Left : Ul « Tags « HTML / CSS
-
The Ultimate Guide To Bullet Points In HTML Email - Litmus
-
How To Control The Space Between Bullets And
- Elements
-
Styling Lists And Links - W3C Wiki
-
Search Code Snippets | List-style-type Outside Padding - Code Grepper
-
How To Set Vertical Space Between The List Of Items Using CSS
-
How To Style Lists With CSS - FreeCodeCamp
-
Creating Lists - Learn To Code HTML & CSS - Shay Howe