Shirish Shirish - 5 months ago 15
CSS Question

display image and text using division tag rowspan in html

I want to achieve the below format which i could easily do it using TD tags.

But if i have to make use of only div tags(rowspan) how is that possible.
Below is the format.
enter image description here

Answer

Not sure if this is what you're looking for?

.row {
   display: block;
   border-top: 1px solid #efefef;
} 
.row > img.img {
  width: 100px;
  display: inline;
  float: left;
  margin: 10px 10px 5px 0;
}
.row > a.title {
  margin-top: 10px;
  font-family: tahoma;
  font-size: 18px;
  color: #338899;
  text-decoration: none;
  display: inline-block;
}
.row > span.description {
  color: #555555;
  display: inline-block;
}
<div class="row">
  <img src="http://assets.rollingstone.com/assets/images/story/taylor-swift-cancels-thailand-concert-due-to-political-turbulence-20140527/20140527-taylorswift-x624-1401220626.jpg" class="img" />
  <a href="#something" class="title">Taylor swift</a>
  <br/>
  <span class="description">This is a singer</span>
</div>

Comments