# Underline from centre (B 066)

Category: Buttons  
Tags: underline, text-button, border-draw, center-origin  
Page: https://designforai.dev/snippet/btn-066

## Prompt

A serif text button (15px, #292524, no box) with a thin 1px amber #b45309 underline that grows outward from the centre on hover (scaleX 0 to 1, origin center, 300ms). Active turns the text amber. Focus outline 2px amber.

## HTML

```html
<button class="btn-066">Our story</button>
```

## CSS

```css
.btn-066 {
  position: relative;
  font: 500 15px/1 Georgia,serif;
  color: #292524;
  background: none;
  border: 0;
  padding: 6px 2px;
  cursor: pointer
}
.btn-066::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: #b45309;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s
}
.btn-066:hover::after {
  transform: scaleX(1)
}
.btn-066:focus-visible {
  outline: 2px solid #b45309;
  outline-offset: 4px
}
.btn-066:active {
  color: #b45309
}
```
