How to remove unwanted space in a HTML box?
-
Using this HTML box we have an unwanted space between the text and the end of the box:
<div style=”border:1px solid black;padding:12px;”><p>TEXT</div>
How to remove this unwanted space between the text and the end of the box?
Thanks in advance for your kind support,
RaphaelThe blog I need help with is: (visible only to logged in users)
-
-
Hi chaitanyamsv,
Thanks a lot for your help!
The blog post is still a draft. So please see the screenshot from the end of the box:
https://www.dropbox.com/s/r2kr03rq5r5d8xc/Bildschirmfoto%202015-08-31%20um%2021.51.19.png?dl=0Thanks,
Raphael -
Try having a different padding at the bottom:
<div style="border:1px solid black;padding: 12px 12px 1px 12px;"><p>TEXT</div>1px is the bottom padding. Adjust it to whatever you like and see it helps.
-
Oops, forgot to mention. Your <p> is not closed. It is always a good idea to close tags. So your code would be:
<div style="border:1px solid black;padding: 12px 12px 1px 12px;"><p>TEXT</p></div>Added a closing </p> before closing </div>.
-
Thanks for that, chaitanyamsv!
I changed the code, but it looks still same.
What’s wrong? -
It is easy to help with CSS if I can see the actual page source. Is it possible to publish the blog so we can fix it? Or at least invite me (use id chaitanyamsv) to view the blog so I can take a look and hopefully fix it.
-
Hi Raphael – please provide a link to the post or page where you’re having the issue – as staff, I can see it even if it’s not published yet.
-
Dear all,
Here’s the link:
http://willipartner.ch/2015/09/02/unternehmensstrategie-das-braucht-ein-kmu-wirklichThanks,
Raphael -
Add this CSS and increase bottom padding from 0px to whatever value you would prefer.
article#post-1625 .entry-content div p:last-child { padding-bottom: 0px; } -
- The topic ‘How to remove unwanted space in a HTML box?’ is closed to new replies.