Grow your CSS skills. Land your dream job.

Vertically center something in an auto-height div..

  • # May 22, 2011 at 10:47 pm

    I want to vertically center the X in the anchor which is 100% height of it’s parent, so it’s dynamic.
    Anybody know how I can do this?

    I feel like an idiot.

    X
    .suborder_item_remove {
    background:url(../images/suborder_item_remove.gif) repeat-y;
    color:#454545; /*Dark Grey */
    float:left;
    line-height:100%;
    position:absolute;
    top:0;
    right:0;
    text-align:center;
    text-decoration:none;
    width:17px; height:100%;
    }
    .suborder_item_remove span {
    display:block;
    height:100%;
    }

    Figured it out, heh.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

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