0

I want to add space before bullet points . My requirement like

This is paragraph1

  • The text line one
  • The text line two

This is paragraph 2

  • The text line one
  • The text line two

Any help will be appreciated.

Sai prateek
  • 11,842
  • 9
  • 51
  • 66

5 Answers5

1

Try setting margin to li

li{
    margin-left: 20px;
}

JSfiddle here

Nishan Hitang
  • 855
  • 3
  • 10
  • 36
0

CSS:

li {
  margin-left:1em;
}
Niels Keurentjes
  • 41,402
  • 9
  • 98
  • 136
  • 1
    It should be `li { padding-left: 1em; }`, as margin pushes everything to the right. Here: [**JSBin**](http://jsbin.com/mugayari/1/) – gtramontina Jun 17 '14 at 05:38
0

You can set CSS to li as per your requirement.

HTML Code

<p>This is my paragraph1</p>
<ul><li> List One </li>
    <li> List Two </li>
    <li> List Three </li>
</ul>
<p>This is my paragraph 2</p>
<ul><li> List One </li>
    <li> List Two </li>
    <li> List Three </li>
</ul>

CSS

li {
  margin-left:1em;
}

JSFiddel

Gagan Gami
  • 10,121
  • 1
  • 29
  • 55
0

apply margin-left to ul

Working Fiddle example is here:

Code:

    [http://jsfiddle.net/Sharan_thethy/MNaUn/][1]

I hope this will help you

Sharanpreet
  • 381
  • 1
  • 2
  • 12
0

There is spacing before bullet points by default. If there isn’t, you are probably using a “Reset CSS” of some kind.

To set the spacing to a desired value, set padding-left and margin-left of both ul and li elements to zero and then set one of them to the desired value.

Jukka K. Korpela
  • 195,524
  • 37
  • 270
  • 390