In this post we present 50 new CSS-techniques, ideas and ready-to-use solutions for effective coding. You definitely know some of them, but definitely not all of them. More details at: http://www.smashingmagazine.com/(…).
Feb 25
Jul 10
If you need set height of one div as long as other div (both div float left) you must do some tricks.
Base code:
#wrapper { clear: both; }
#cola { float: left; width: 100px; }
#colb { float: left: width: 100px; }
<div id="wrapper">
<div id="cola"></div>
<div id="colb">Some content.</div>
</div>
Now if you want to have same height in cola and colb you must add:
#wrapper { overflow: hidden; }
#cola { margin-bottom:-32767px; padding-bottom:32767px; }
Apr 18
height: 60px;
height: auto !important;
min-height: 60px;
Apr 18
Problem solved on: www.jakpsatweb.cz
Apr 18
Info
Setting vertical aligment to middle for one (!!!) line of text.
Solution
In css styles:
.mid {
height: 2em;
line-height: 2em;
background-color: #eee;
}
In html code:
<p class="mid">Lorem ipsum etc.</p>