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

Home Forums CSS block link border problem

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #29862

    Hello everyone,

    I am trying to style my links like what you can see here:

    So of course it should be very simple, my links are displayed as blocks and I should use the border-bottom to do that.

    However my problem is that, unlike in the example, my link blocks all have the same width, 125px, which means that instead of having the bottom border underlining just the text, it is actually much longer which is not the desired effect. Here is a picture.


    So can anyone help me keep the same width for my link blocks but still have the thick border only under the text of the links just like in the example?

    Many thanks.


    Do you have a link?


    Hi again, thank you so much, you are a genius.

    I was actually trying something like that but with div instead of span and around the link itself instead of the link’s text and it didn’t work, I just couldn’t get the alignment right.

    Once again thanks a million.

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