WordPress.org

Ready to get started?Download WordPress

Forums

Defining Properties for Left & Right Aligned Images (4 posts)

  1. Stunt
    Member
    Posted 6 years ago #

    Is there a way to define properties in the CSS for images aligned to the left when posting (<img src="source" align="left">) such as "margin: 0pt 10px 10px 0pt"?

  2. Adam Brown
    Member
    Posted 6 years ago #

    ONly if you give them a class instead of an "align":

    <img src="" class="left" />

    CSS:

    img.left{float:left;margin:0 10px 10px 0;}

  3. Stunt
    Member
    Posted 6 years ago #

    I'm trying that but it doesn't work:

    .storycontent img .left {
    float : left;
    margin : 0 10px 10px 0;
    }

    And then I put the image as <img src="source" class="left" /> But it doesn't float left at all or margin out.

  4. Stunt
    Member
    Posted 6 years ago #

    Nevermind, I got it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags