WordPress.org

Ready to get started?Download WordPress

Forums

quickie! (6 posts)

  1. james948
    Member
    Posted 1 year ago #

    I've put two images up with two words and made the images links. But the text is apparently interfering with the image links and there is an area in the middle of each image where you can't click.

    http://alexrooney.com/gallery/

    Why is this?
    here is my html:

    <div style="width: 390px; left: 250px; top: 90px; position: absolute; z-index: 0;">
    <h2 style="text-align: left;">Portraits</h2>
    </div>
    <h2><a href="http://alexrooney.com/gallery/portraits/"><img class="size-full wp-image-223 aligncenter" title="Jon copy" src="http://alexrooney.com/wp-content/uploads/2012/09/Jon-copy.jpg" alt="" width="141" height="191" /></a></h2>
    <div style="width: 390px; left: 250px; top: 290px; position: absolute; z-index: 0;">
    <h2 style="text-align: left;">Objects</h2>
    </div>
    <h2><a href="http://alexrooney.com/gallery/objects/"><img class="alignnone size-full wp-image-224 aligncenter" title="Cup" src="http://alexrooney.com/wp-content/uploads/2012/09/Cup.jpg" alt="" width="141" height="191" /></a></h2>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum's parser.]

  2. Andrew Nevins
    Spam zapper & Volunteer Moderator
    Posted 1 year ago #

    <h2> tags are block elements, therefore they take up the as much horizontal space as possible unless specified not to.

    As you can see, the headings in your page take up space that of the images.

    Normally the image would be pushed down, but as you've positioned absolute your heading, or the parent <div> of the heading, you're going to experience this problem.

    You may need to remove position absolute, add floats and re-structure your HTML.
    -
    OR
    -
    Add a smaller width on the heading.

  3. james948
    Member
    Posted 1 year ago #

    Ok. Not sure I know how to do this but will give it my best shot.

  4. james948
    Member
    Posted 1 year ago #

    Ok. I'm a fool. I know know not how to do it. Can someone give me a hand with floating this bad boy?

  5. Andrew Nevins
    Spam zapper & Volunteer Moderator
    Posted 1 year ago #

    Your query may be better answered on a CSS specific forum, http://csscreator.com/

  6. james948
    Member
    Posted 1 year ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.