remove margin above image (css)
-
there is margin above image in visual editor .
What css is for removing image margin?
Here is screenshot
http://i.imgur.com/t3lYxm2.png
want to remove margin above image
-
hello,
margin-top: 0; ?but if you provide atleast your website’s url, we can check it better.
Have fun!
Hi,Thanks for reply
I know about margin-top: 0;
But what css class to select?
here is the link
http://cardmart.tk
Image is on homepage
Thanks.wp-caption.alignleft, img.alignleft {
margin: 10px 20px 10px 0;
}to
.wp-caption.alignleft, img.alignleft {
margin: 0 20px 10px 0;
}and, in your html you have;
<div class=”col-md-6″>
<p></p>
<p>
<img class=”alignleft wp-image-480 size-full” width=”675″ height=”320″ alt=”rsz_grace_overview_new” src=”http://cardmart.tk/wp-content/uploads/2015/07/rsz_grace_overview_new.jpg”>
</p>
<p></p>
</div>it’s the empty p tags that are causing the other 10px
Hey,Thanks for reply
nothing happened still there is marginCopy and paste without any newline and space on text mode (not visual)
<div class="col-md-6"><img class="alignleft wp-image-480 size-full" width="675" height="320" alt="rsz_grace_overview_new" src="http://cardmart.tk/wp-content/uploads/2015/07/rsz_grace_overview_new.jpg"></div>@a2ztec
Image becomes smaller and still there is marginSorry rdxcsgoid,
My internet sucks yesterday so I can’t respond faster. Anyways, try this.
In your code, i really don’t know where to find this, I really don’t use child themes or whatever they are.. but I think you can do this yourself. Search around your codes.. everywhere, especially “style.css” and find this chunk of codes:
<style type="text/css" media="all" id="siteorigin-panels-grids-wp_head">/* Layout 2 */ #pg-2-0 , #pg-2-2 , #pg-2-3 , #pl-2 .panel-grid-cell .so-panel { margin-bottom:30px } #pg-2-1 { margin-bottom:100px } #pgc-2-3-0 , #pgc-2-3-1 { width:50% } #pg-2-3 .panel-grid-cell , #pg-2-4 .panel-grid-cell { float:left } #pgc-2-4-0 , #pgc-2-4-1 , #pgc-2-4-2 { width:33.333% } #pl-2 .panel-grid-cell .so-panel:last-child { margin-bottom:0 } #pg-2-3 , #pg-2-4 { margin-left:-15px;margin-right:-15px } #pg-2-3 .panel-grid-cell , #pg-2-4 .panel-grid-cell { padding-left:15px;padding-right:15px } @media (max-width:780px){ #pg-2-0 .panel-grid-cell , #pg-2-1 .panel-grid-cell , #pg-2-2 .panel-grid-cell , #pg-2-3 .panel-grid-cell , #pg-2-4 .panel-grid-cell { float:none;width:auto } #pgc-2-3-0 , #pgc-2-4-0 , #pgc-2-4-1 { margin-bottom:30px } #pl-2 .panel-grid { margin-left:0;margin-right:0 } #pl-2 .panel-grid-cell { padding:0 } } </style>if you look at the top of the code, you will see this guy:
#pg-2-0 , #pg-2-2 , #pg-2-3 , #pl-2 .panel-grid-cell .so-panel { margin-bottom:30px }see the 30px on margin-bottom ? make it 0px see what happens..
Hope that helps.
Hi destinymaker
Thanks for your suggestion, But i dont Want to make any changes in style.css ,i havent created the child theme . i was making changes to css through custom css option in wordpress.
CAnt we make changes through custom css?
Thank YouOh yes, about that, you’re definitely right. I’ll take a look at it for awhile, cause I never used custom.css.
For the meantime, if you put those on your custom.css, will it make a difference or not?
EDIT: If custom.css comes AFTER style.css then I guess it is safe to assume that it will override the style.css of the current theme, just add those, and see if overriding works.
Have fun!
Hi again
Thanks for replying
But still not working
lol i dont think its so difficult !! its just 2-3 line css code
Thanks for helping , hope you will get the solution 🙂
The topic ‘remove margin above image (css)’ is closed to new replies.