Shahmeer Navid
Shahmeer Navid

Reputation: 566

Line Break in Button?

I have a button that is made using anchor tags and display:block; (so the entire button in cickable)

I want to add a linebreak in the button (for styling purposes) and am achieving this through the display:block; property. The problem is that the part of the button that the display:block; property is assigned becomes unclickable.

Here is my code:

HTML

<a href="#">
   <span class="top">Connected To</span>
   <span class="bottom">Relationships</span>
</a>

CSS

 a{
      display:block;
      padding:5px 20px;
    }
    .top{
      display:block;
      font-size:15px;
    }
    .bottom{
      font-size:25px;
      font-weight:bold;
    }

Any ideas?

Upvotes: 0

Views: 131

Answers (2)

Cameron
Cameron

Reputation: 1524

Is there any kind of weird line-height setting that you may have applied with the cufon style?

Upvotes: 0

Jon
Jon

Reputation: 437336

Even though this code is perhaps more complicated than it needs to be, it works just fine. Perhaps your problem is somewhere else.

Upvotes: 3

Related Questions