WordPress.org

Forums

Image groups (3 posts)

  1. stilgar
    Member
    Posted 9 years ago #

    I'm working on a plugin to insert pictures from coppermine into posts. I want to improve the layout code, and release it as a library that could be used for other integration projects.

    This is a demonstration of different presentation styles for image groups. Do you miss any particular layout style ? Are you a CSS god and do you know how to center the images in section 2 ? Do you have suggestions or questions ?

    Please comment !

  2. estjohn
    Member
    Posted 9 years ago #

    no im nto a CSS god, but if i look at the source of the page, i can see a BIG difference with the way that you have done section 1 and section 2

    section 2 you have added div and span to each individual pics
    section one you did not do it individually

    uif section 1 wworks...
    then just copy the html from it and put the html in section 2, change pics if you want to

    <div class="cpg-grp-center">
    <img alt="" src="zeilen/img001.jpeg"/>
    <img alt="" src="zeilen/img000.jpeg"/>
    <img alt="" src="zeilen/img002.jpeg"/>
    <img alt="" src="zeilen/img003.jpeg"/>
    <img alt="" src="zeilen/img004.jpeg"/>
    <img alt="" src="zeilen/img005.jpeg"/>
    <img alt="" src="zeilen/img006.jpeg"/>
    <img alt="" src="zeilen/img007.jpeg"/>
    <img alt="" src="zeilen/img008.jpeg"/>
    <div class="spacer"> </div>
    </div>
    <div class="cpg-album-link">Visit this album</div>
    </div>

    vs
    <div>
    <div class="cpg-img-box">
    <img alt="" src="zeilen/img000.jpeg"/>
    <span class="label">img000</span>
    </div>
    <div class="cpg-img-box">
    <img alt="" src="zeilen/img001.jpeg"/>
    <span class="label">img001</span>
    </div>
    <div class="cpg-img-box">
    <img alt="" src="zeilen/img002.jpeg"/>
    <span class="label">img002</span>

  3. stilgar
    Member
    Posted 9 years ago #

    Alas, I wish it were that simple..

    Unfortunately divs are not affected by text-align: center (except in ie...), and there is no centering instruction to align collections of block level elements.

    margin-auto works for a single element, but not to center groups of floats.

    I tried using <a href=".."><img><span></a>, and setting the span to display: block, but that makes that the <a>; is seen as a block-level element too, so it becomes unaffected by text-align.

    It seems like a pretty basic problem, but I've tried a lot of different ways to do it, and I bothered many people with this, but no results.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags