/    Sign up×
Community /Pin to ProfileBookmark

control <li> spacing

I’m trying to do two things with my <ul> menu:

Firstly, every <li> seems to automatically indent, so I’d like to have the bullet left aligned directly beneath the paragraph above.

Secondly, some of the <li> items wrap onto 2 lines. Thats fine, but I’d like a space between each <li>, but adding line height then adds a space to the <li> items which are wrapped onto 2 lines….

I’m sure there is a way of doing both these – and I’ve tried adjusting my code (set the margins to 0 to remove the indent, added padding to space each <li> but nothing appears to have worked so far)!

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@FangDec 08.2010 — [CODE]li {
list-style-position:inside;
margin:1em 0;
}[/CODE]
Copy linkTweet thisAlerts:
@LouPhiauthorDec 08.2010 — Perfect - the crazy thing is I'd already tried both of those (but separately) and neither had worked before!?? Obviously I'd done something wrong :rolleyes:
×

Success!

Help @LouPhi spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.31,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...