• I want to have the choice of whether an image is aligned left or right, and for it to have a border around it, with some padding with the text wrapping it. It’s worked in that the image is floated left in this instance, but it hasn’t added the border, or wrapped the text. What’s gone wrong here on my part?

    Here’s the quicktag info:

    edButtons[edButtons.length] =
    new edButton('ed_imgleft'
    ,'imgleft'
    ,'<div class="img.left">'
    ,'</div>'
    ,'7'
    );

    edButtons[edButtons.length] =
    new edButton('ed_imgright'
    ,'imgright'
    ,'<div class="img.right">'
    ,'</div>'
    ,'8'
    );

    The css:

    img.left {
    margin: 4px;
    float: left;
    padding: 1px;
    border: 3px solid #fff;
    }

    img.right {
    margin: 4px;
    float: right;
    padding: 1px;
    border: 3px solid #fff;
    }

    The tag is wrapped around the img src bit as a div around it. I;m not sure how else to do it without making everything align one way only or the other.

    I would be grateful for help on this.

    Thanks in advance

Viewing 1 replies (of 1 total)
  • Thread Starter jinsan

    (@jinsan)

    ok I got this working to an extent now that I figured out that the class should have been img class=”x” rather than a div class. Changed img.class to div.class and hey presto.

    Now I only have one problem I hope someone can clear for me. On that same page two paragraphs seem to be joined at the hip between the image of the show and the handbag. Is there anyway to keep the space between the two paragraphs or am I stuck with them being joined?

    The same has happened at the top of the page with the two paragraphs next to the cheetah image.

    Thanks in advance

    EDIT 3: Well I went back anc changed it back to img.class because using divs caused the paragraphs to merge, not using divs worked and well, I want it to work obviously!

    If it can be made to work with divs let me know how. Cheers

Viewing 1 replies (of 1 total)
  • The topic ‘Styling images with quicktags’ is closed to new replies.