Href на новой линии

0

У меня есть следующий контент

<div class="venue-description">
   <h4>Description</h4>
                    Nandi Hills are currently undergoing a multi-crore development, including a one crore renovation of the Tipu Fort, via private-public partnership to transform the hills into a tourist hub. The Department of Horticulture is setting up a food court modeled after one in Singapore at a cost of nearly one crore at the hill station.Various varieties of vegetarian and continental food, beverages, bakery products, ice-creams and fresh fruit juices will be available.
<a href="" class="more">view more</a>   
</div>

Я хочу переместить a tag на новую строку. Использование display: block создаст ссылку на полную ширину, что плохо для удобства использования.

я не хочу использовать тег <br/>

  • 3
    Оберните текст в тег абзаца, как и должно быть.
  • 3
    Поставьте <br /> перед ссылкой.
Показать ещё 3 комментария
Теги:

2 ответа

4
Лучший ответ

DEMO

a::before {
    content:'';
    display:block;
}
1

Почему ты просто не положил

<br/>

после

<h4>Description</h4>
                    Nandi Hills are currently undergoing a multi-crore development, including a one crore renovation of the Tipu Fort, via private-public partnership to transform the hills into a tourist hub. The Department of Horticulture is setting up a food court modeled after one in Singapore at a cost of nearly one crore at the hill station.Various varieties of vegetarian and continental food, beverages, bakery products, ice-creams and fresh fruit juices will be available.
  • 1
    Элемент <br/> в этом месте был бы несементическим. Мы должны сделать все возможное, чтобы сохранить HTML чистым и семантическим, и работать с макетом только из CSS.

Ещё вопросы

Сообщество Overcoder
Наверх
Меню