Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

if the image is always the same height + descriptions lenght is always gonna be similar, you could hack it with line-height or/and margin-top, or using vertical-align on image eample using vertical-align can be found here: http://stackoverflow.com/a/13780959/1134615 https://stackoverflow.com/a/13780959/1134615

simple fiddle using line height:

http://jsfiddle.net/BrFga/

html

 <ul>
 <li>
 <img src=""/> 
 <p>Sample text</p>
 </li>
 </ul>​

css

ul {
 height: 120px;
 width: 600px;
 outline: red 1px solid; 
}
img {
 height: 120px;
 width: 120px;
 float: left;
}
p {
 height: 120px;
 line-height: 120px;
}

if the image is always the same height + descriptions lenght is always gonna be similar, you could hack it with line-height or/and margin-top, or using vertical-align on image eample using vertical-align can be found here: http://stackoverflow.com/a/13780959/1134615

simple fiddle using line height:

http://jsfiddle.net/BrFga/

html

 <ul>
 <li>
 <img src=""/> 
 <p>Sample text</p>
 </li>
 </ul>​

css

ul {
 height: 120px;
 width: 600px;
 outline: red 1px solid; 
}
img {
 height: 120px;
 width: 120px;
 float: left;
}
p {
 height: 120px;
 line-height: 120px;
}

if the image is always the same height + descriptions lenght is always gonna be similar, you could hack it with line-height or/and margin-top, or using vertical-align on image eample using vertical-align can be found here: https://stackoverflow.com/a/13780959/1134615

simple fiddle using line height:

http://jsfiddle.net/BrFga/

html

 <ul>
 <li>
 <img src=""/> 
 <p>Sample text</p>
 </li>
 </ul>​

css

ul {
 height: 120px;
 width: 600px;
 outline: red 1px solid; 
}
img {
 height: 120px;
 width: 120px;
 float: left;
}
p {
 height: 120px;
 line-height: 120px;
}

added 54 characters in body
Source Link
mmln
  • 2.1k
  • 3
  • 24
  • 34

if the image is always the same height + descriptions lenght is always gonna be similar, you could hack it with line-height or/and margin-top, or using vertical-align on image eample using vertical-align can be found here: http://www.w3schools.com/cssref/pr_pos_vertical-align.asp http://stackoverflow.com/a/13780959/1134615

simple fiddle using line height:

http://jsfiddle.net/BrFga/

html

 <ul>
 <li>
 <img src=""/> 
 <p>Sample text</p>
 </li>
 </ul>​

css

ul {
 height: 120px;
 width: 600px;
 outline: red 1px solid; 
}
img {
 height: 120px;
 width: 120px;
 float: left;
}
p {
 height: 120px;
 line-height: 120px;
}

if the image is always the same height + descriptions lenght is always gonna be similar, you could hack it with line-height or/and margin-top, or using vertical-align on image http://www.w3schools.com/cssref/pr_pos_vertical-align.asp

simple fiddle using line height:

http://jsfiddle.net/BrFga/

html

 <ul>
 <li>
 <img src=""/> 
 <p>Sample text</p>
 </li>
 </ul>​

css

ul {
 height: 120px;
 width: 600px;
 outline: red 1px solid; 
}
img {
 height: 120px;
 width: 120px;
 float: left;
}
p {
 height: 120px;
 line-height: 120px;
}

if the image is always the same height + descriptions lenght is always gonna be similar, you could hack it with line-height or/and margin-top, or using vertical-align on image eample using vertical-align can be found here: http://stackoverflow.com/a/13780959/1134615

simple fiddle using line height:

http://jsfiddle.net/BrFga/

html

 <ul>
 <li>
 <img src=""/> 
 <p>Sample text</p>
 </li>
 </ul>​

css

ul {
 height: 120px;
 width: 600px;
 outline: red 1px solid; 
}
img {
 height: 120px;
 width: 120px;
 float: left;
}
p {
 height: 120px;
 line-height: 120px;
}

added 479 characters in body
Source Link
mmln
  • 2.1k
  • 3
  • 24
  • 34

if the image is always the same height + descriptions lenght is always gonna be similar, you could hack it with line-height or/and margin-top, or using vertical-align on image http://www.w3schools.com/cssref/pr_pos_vertical-align.asp

simple fiddle using line height:

http://jsfiddle.net/BrFga/

html

 <ul>
 <li>
 <img src=""/> 
 <p>Sample text</p>
 </li>
 </ul>​

css

ul {
 height: 120px;
 width: 600px;
 outline: red 1px solid; 
}
img {
 height: 120px;
 width: 120px;
 float: left;
}
p {
 height: 120px;
 line-height: 120px;
}

if the image is always the same height + descriptions lenght is always gonna be similar, you could hack it with line-height or/and margin-top

if the image is always the same height + descriptions lenght is always gonna be similar, you could hack it with line-height or/and margin-top, or using vertical-align on image http://www.w3schools.com/cssref/pr_pos_vertical-align.asp

simple fiddle using line height:

http://jsfiddle.net/BrFga/

html

 <ul>
 <li>
 <img src=""/> 
 <p>Sample text</p>
 </li>
 </ul>​

css

ul {
 height: 120px;
 width: 600px;
 outline: red 1px solid; 
}
img {
 height: 120px;
 width: 120px;
 float: left;
}
p {
 height: 120px;
 line-height: 120px;
}

Source Link
mmln
  • 2.1k
  • 3
  • 24
  • 34
Loading
lang-html

AltStyle によって変換されたページ (->オリジナル) /