/    Sign up×
Community /Pin to ProfileBookmark

List Item Border Width

Hi, I’m trying to get the border of a list item to go the complete width of the list. When I set the border-bottom of the li’s it only goes from the starting point of the li to the end. I want it to start from the left edge and to all the way to the end, right edge. Any help or ideas would be great. Thanks

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@David_HarrisonFeb 18.2004 — Try doing this:

li{margin-left:0;padding-left:30px;border-bottom:1px solid;}

The reason the bottom border doesn't extend all the way to the left is because li's come with a built in left margin. Since the margin is outside the border, if you replace the left margin with some left padding the bottom border will extend all the way to the left.
×

Success!

Help @rpanning 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.18,
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,
)...