Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text won't wrap correctly when using padding-left

Tags:

html

css

Each link in the menu on the left has padding-left: 15px; the reason for this is so I can add a background image (the blue arrow).

But now, when the text wraps (see "Paintings, prints, and watercolours"), it ignores the padding.

After searching around I can't find any similar cases at all, is that because I am going at this wrong?

If what I have at the moment is fine, how can I fix the wrapping issue?

like image 819
472084 Avatar asked May 15 '12 13:05

472084


1 Answers

Padding only applies to block-level elements. Either assign your menu's a elements a display:block; or display:inline-block; to get them to respond properly to padding.

like image 153
random_user_name Avatar answered Sep 19 '22 18:09

random_user_name