Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   [SOLVED] Removing margin from top of images (http://forum.bytesforall.com/showthread.php?t=4416)

maija Nov 13, 2009 11:25 AM

[SOLVED] Removing margin from top of images
 
This isn't a question, but something that I just solved myself. But I did spend a lot of time trying things in the ATO and searching for an answer here first, and maybe someone else has the same question.

The issue is the margin at the top of images. I align all of my images with the first line of a paragraph. The image was hanging at the middle of the first line of text instead of being flush with the top of the line. It looked really ugly in multi-post pages with short excerpts. Nothing I did to the ATO "Style IMAGES" options had an effect. I found the relevant css in css.php, copied it, pasted it to "Add HTML/CSS Inserts" and changed the top margin values.

Code:

/*image margins*/

.post img.alignleft {
        float: left;
        margin: 0px 10px 5px 0;
        }
       
.post img.alignright {
        float: right;
        margin: 0px 0 5px 10px;
        }

.post img.aligncenter {
        display: block;
        margin: 0px auto;
        }

.aligncenter,
div.aligncenter {
          display: block;
          margin-left: auto;
          margin-right: auto;
        }

.alignleft,
div.alignleft {
        float: left;
        margin: 0px 10px 5px 0;
        }

.alignright,
div.alignright {
          float: right;
          margin: 0px 0 5px 10px;
        }


mimi Oct 14, 2011 08:45 AM

Thanks so much, this drove me crazy lately.

tbaxter Oct 7, 2012 11:15 PM

THANK YOU THANK YOU THANK YOU!

I have two sites I'm working on and this is driving me crazy too!

Though I see the need for top margins on images placed in a para as opposed to the first line. I'm thinking of making the 1st line image a style to apply to the pics in that spot.


All times are GMT -6. The time now is 08:39 AM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.