# \[CSS\] Fixed height for inline elements?

**URL:** <https://forum.kirupa.com/t/css-fixed-height-for-inline-elements/185975>\
**Category:** web dev\
**Created:** [April 18, 2006, 5:26am UTC](https://forum.kirupa.com/t/css-fixed-height-for-inline-elements/185975 "2006-04-18T05:26:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MTsoul](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@MTsoul](https://forum.kirupa.com/u/MTsoul)\
**Post date:** [April 18, 2006, 5:26am UTC](https://forum.kirupa.com/t/css-fixed-height-for-inline-elements/185975/1 "2006-04-18T05:26:38Z")

</div>

I’ve searched everywhere, but no luck ☹

I want to create a \<a\> link button that has a fixed height, but fluid width, which means it has to be an inline element as its width stretches to its content. But I can’t use top or bottom padding for an inline element, and therefore can’t set its intended height. How is it possible to achieve the effect? Adding extra elements is fine, as long as it’ll work.

Thanks in advance. :thumb2:

---

<div class="post-metadata">

**Author:** ![MTsoul](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@MTsoul](https://forum.kirupa.com/u/MTsoul)\
**Post date:** [April 18, 2006, 6:25am UTC](https://forum.kirupa.com/t/css-fixed-height-for-inline-elements/185975/2 "2006-04-18T06:25:25Z")

</div>

Ah I figured out a hack. display: block; float: right; 🙂
