Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

paragraph "<p>" padding not applied

The following three pieces of code behave exactly the same:

<p {padding: 0 15 0 15}>  A paragraph of text here...  </p>

<p> A paragraph of text here... </p>

<p style="padding: 0 15 0 15">  A paragraph of text here...  </p>

How do I get the paragraph indented on both sides? (I tried 15px instead of 15 (EDIT - but only on the first two), I also tried separating the numbers with commas, like an example I found on Google.)

The above code is in a div which is in the body, no other divs or tables, etc. are involved.

The div is defined:

<div style="background-color: white; color: black; overflow:auto">

Thanks for any help.

like image 623
Rilien Avatar asked Mar 11 '10 15:03

Rilien


1 Answers

15? 15 what? Have you considered using units?

<p style="padding: 0 15px">foo</p>
like image 62
nickf Avatar answered Nov 15 '22 19:11

nickf