Forums

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

Home Forums CSS Clickable li’s with different number of text lines inside

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #42077
    tirengarfio
    Participant

    Hi,

    I’m trying to render clickable li’s but independent from the content that there is inside of the li. For example the code below has one button with just one line and another one with four lines:

    ul{
    background: red;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    float: left;
    }

    li {
    padding: 10px; display: inline-block;
    border-left: 1px solid white;
    width: 100px;
    text-align: center;
    vertical-align: middle;
    }
    li:first-child {border-left: none;}

    a {

    }

    Here is the [jsfiddle](http://jsfiddle.net/tirengarfio/y3NCq/19/).

    #121351
    Andy Howells
    Participant

    Are you saying you want 4 buttons inside the second LI? I’m a bit confused about what you’re looking to achieve?

    #121352
    Paulie_D
    Member

    Me too…surely that’s the same as submenu (effectively): http://codepen.io/Paulie-D/pen/lDycA

    Or did you mean that each item would not be a link?: http://codepen.io/Paulie-D/pen/uIvBd

    #121363
    tirengarfio
    Participant

    @Pauline_D im talking about the second option you mention. As you can see in that example the li area of the first item is not all clickable entire. I would like it was clickable entire.

    #121371
    Paulie_D
    Member

    OK…that’s doable: http://codepen.io/Paulie-D/pen/dAJLt

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