jQuery in Action, 2nd edition
The moose likes HTML, CSS and JavaScript and the fly likes Indentation of SubList Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Indentation of SubList" Watch "Indentation of SubList" New topic
Author

Indentation of SubList

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 568
If we create a nested list by placing a <ul> under another <ul>, how do we control the amount of identation given to the nested list relative to the upper list?
Satish Chilukuri
Ranch Hand

Joined: Jun 23, 2005
Posts: 266
You can use CSS for that. Give the nested list some padding-left.
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1123
Alec,

Please have a look at the following page �
http://jake.cfwebtools.com/index.cfm/2007/5/1/CSS-Browser-Hacks

and look for -


I want there to be no indentation in the list, just a vertical list of links. Also, I don't want any list style


The example below, based on the above page, works well in IE 6 but not in FF. Please play a bit with the margin-left of 'ul li ul'.

Regards,
Dan



William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Indentation of SubList
 
Similar Threads
JSP list
reading a nested list with javascript
wide navigation bar causes problems
Complex Table and JSTL
selecting pure text in jquery