Grow your CSS skills. Land your dream job.

HTML5BP .ir with a link

  • # February 4, 2013 at 9:57 am

    I’m using HTML5BP on a project and I have a h1 with the .ir applied to it for the site logo.

    Welcome To Foo Bar

    What I would like to do is add a link to the logo but it don’t seam to be working.

    If i do it this way the link doesn’t work.

    Welcome To Foo Bar

    but if I do it this way the image doesn’t show up.


    Welcome To Foo Bar

    This is the css of the HTML5BP .ir class

    .ir {
    background-color: transparent;
    background-repeat: no-repeat;
    border: 0;
    direction: ltr;
    display: block;
    overflow: hidden;
    text-align: left;
    text-indent: -999em;
    }

    Does anyone have an idea which one should be working and what might be wrong please help cheers.

    # February 4, 2013 at 10:00 am

    @Blackhawkso, you need to make the anchor a block element and add width 100% and height 100% for the link to work.

    .ir a {
    display: block;
    height: 100%;
    width: 100%;
    }

    # February 4, 2013 at 10:02 am

    Right got it cheers @ChrisP

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".