NameSilo

CSS Code For setting the bottom margin

Spaceship Spaceship
Watch

TWM

Web Marketing SpecialistEstablished Member
Impact
9
I have

img.newsbar { margin-top: .8cm; margin-bottom: .8cm;}

the margin-top works fine, but the bottom wont. I have tried everything from using px instead of cm to putting it in its own line and everything. Any ideas on how to set the bottom margin with CSS?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
bump
 
0
•••
Hello
why not set the environment height

like <div id="bump" style="height: 120px">
<img src="....." width="30" height="30" style="padding-top: 8px" alt="">
</div>

i am trying to help...
 
0
•••
The way i am doing it is i set the image height at 100% so that when i add the CSS, no matter how long the page is, it will always be X amount of pixels away from the top of the page and the bottom.

The top part works, but the bottom wont.
 
0
•••
0
•••
Just add a <div> around your image. If that doesn't work, then remove the margins from the image, and just add this CSS to the newly created DIV:

<div style="padding: .8cm 0cm .8cm 0cm;">
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back