Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Same height button and a link

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #42063
    alexmccabe
    Participant

    I wanted a cancel <a> link and a form submit button to be EXACTLY the same height. I spent a long time racking my brain over this, trying so many things. I could get it right in one browser, for the other to be a couple pixels too tall or short.

    Anyway, I finally did it. Now this seems like a lot of code, so it could probably be condensed, but if anyone else has had the same problem; [here it is](http://codepen.io/alexmccabe/pen/FyAEd “sdgdf”)

    My actual code differs slightly, but this is it in essence.

    #121346
    DavidYarham
    Member

    Instead of setting the elements as Blocks and floating, why not use display:inline-block.

    #121348
    Andy Howells
    Participant

    Dude you’ve got quite a lot of unnecessary code in there, I’ve updated and stripped it down to exactly what is needed.

    http://codepen.io/andyunleashed/pen/hociB

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.