Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify the URL of a linked item in Semantic UI?

Tags:

semantic-ui

When using a "Link Item", begun with <div class="ui divided link items">, in Semantic UI (as per the manual: http://semantic-ui.com/views/item.html), where should I specify the URL of the page I would like the item to link to?

I tried wrapping the whole <div class="item"> within <a>, but doing so breaks the formatting of the item such that the content appears below the picture.

like image 851
Robert Bergs Avatar asked Nov 09 '22 01:11

Robert Bergs


1 Answers

You can sub your div.item with a.item like in this fiddle or HTML below:

<div class="ui divided link items">
  <a class="item" href="http://www.google.com" target="_blank">
    <div class="ui tiny image">
      <img src="http://www.semantic-ui.com/images/avatar/large/stevie.jpg">
    </div>
    <div class="content">
      <div class="header">Google</div>
      <div class="description">
        <p></p>
      </div>
    </div>
  </a>
  <a class="item" href="http://www.yahoo.com" target="_blank">
    <div class="ui tiny image">
      <img src="http://www.semantic-ui.com/images/avatar/large/veronika.jpg">
    </div>
    <div class="content">
      <div class="header">Yahoo!</div>
      <div class="description">
        <p></p>
      </div>
    </div>
  </a>
  <a class="item" href="http://duckduckgo.com/" target="_blank">
    <div class="ui tiny image">
      <img src="http://www.semantic-ui.com/images/avatar/large/jenny.jpg">
    </div>
    <div class="content">
      <div class="header">DuckDuckGo</div>
      <div class="description">
        <p></p>
      </div>
    </div>
  </a>
</div>
like image 139
AVK Avatar answered Jan 04 '23 02:01

AVK