SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Link images

  1. #1
    SitePoint Addict hitmanuk2k's Avatar
    Join Date
    Apr 2003
    Location
    Leeds, England
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Link images

    Hello,

    I would like to have images on text links in my new design, but not for images. To see what I mean visit this link and notice there are arrows next to the images in the post. I would only like these arrows beside text links. How can I achieve this?
    Follow me on Twitter, or find me on LinkedIn. Latest project: loanpayday.org.uk.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,379
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    HI,

    You can't do this automatically. You will have to add a class to all the anchors that contain images and remove the background.

    e.g.

    Code:
    .entrytext p a.noimg{background:none}

    Code:
    <a class="noimg" href="etc........
    You could try something clever like moving the image so that it hides the link image but I don't know how successful it will be and whether results will be reliable cross browser. It also assumes that you only have those largish images to cater for.

    Code:
    .entrytext p a img{
        display:inline;
        margin-left:-13px;
        position:relative;
        left:33px;top:30px;
        margin-top:-15px
    }

    The best solution is to add the class as I have shown earlier.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •