/    Sign up×
Community /Pin to ProfileBookmark

vert spacing of list

I have some text (no tags) and then a list with three items.
It looks like by default, the browser will add some space betweeen the text (or whatever is on top of the list) and the first list item.
That would be OK for me most of the time. But here I have a page where I want to put stuff close together.
I don’t think I would like to go out of my way to get this result, but if there were an easy way to reduce this space it would be great. I can not use php or any server-side programming, just html and css.
I’ll appreciate your help.

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@DaveSWFeb 10.2004 — have you set ul and li margins and padding to 0?
Copy linkTweet thisAlerts:
@quantumauthorFeb 10.2004 — No Dave, I hadn't set margins and padding to 0. I thought they would be zero if you don't set them to some value, but according to what you are suggesting, that's not the case.

Well, after your suggestion, I first set those attributes to zero just for ul. But when I viewed the page in the browser, the bullets and indentation were gone. I thought, maybe I need to set margins and padding of li also to zero for this to work. But when I did, the bullets and indenting didn't come back.

Maybe there is another trick that works or maybe I did something wrong.

If you have any other ideas, I'll appreciate it.
Copy linkTweet thisAlerts:
@ray326Feb 11.2004 — If you still want the bullets and indents then just set margin-top margin-bottom to crunch the lines together.
Copy linkTweet thisAlerts:
@quantumauthorFeb 11.2004 — Thanks a lot Ray, I'll try that.
×

Success!

Help @quantum 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.28,
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,
)...