Add padding to a single div

16,460

Solution 1

Try <div style="padding-top: 10px;"> :)

Solution 2

Use firebug on Chrome or Firefox and see which div or element inside the carousel needs the padding you want.

However, the best way would be to use CSS. As you said, you want a padding, and CSS has the padding property. As @Jorgen said, just add a padding top.

Otherwise use <br> instead as @Mr Lister said

Share:
16,460
jsan
Author by

jsan

Updated on June 04, 2022

Comments

  • jsan
    jsan almost 2 years

    How can I add padding to the top of a single div? Is there a way to do it without modifying the .css file? I am using Bootstrap and there is no space between the carousel and the first div. I tried adding padding to the carousel, but the color of the left and right chevron overlap the padding, and this is not the look I want. I want a true white space between the two.

  • Michelangelo
    Michelangelo about 9 years
    Technically this is playing with css :)