html - Can't get horizontal columns to work -
so i'm trying span list across 4 horizontal columns. set each div
25%
still not luck. here's got going
<div class="listed"> <div class="section-one" style="display: inline-block;width: 25%;"> <h3>all rooms</h3> <ul> <li>dust furniture</li> <li>polish furniture</li> <li>dust misc. items</li> <li>dust windowsills</li> <li>dust ceiling fans</li> <li>remove trash</li> <li>vacuum carpets</li> <li>sweep floors</li> <li>mop floors</li> <li>dust , sanitize light switches</li> </ul> </div> <div class="section-two" style="display: inline-block;width: 25%;"> <h3>kitchen</h3> <ul> <li>scrub & sanitize sinks</li> <li>scrub & sanitize counters</li> <li>place dishes in dishwasher (if empty)</li> <li>clean surfaces</li> <li>clean outside of appliances</li> <li>clean inside of microwave</li> </ul> </div> <div class="section-three" style="display: inline-block;width:25%;"> <h3>bedrooms</h3> <ul> <li>make beds</li> <li>change linens</li> </ul> </div> <div class="section-four" style="display: inline-block;width: 25%;"> <h3>bathrooms</h3> <ul> <li>scrub & disinfect toilets</li> <li>scrub & disinfect tubs</li> <li>scrub & disinfect showers</li> <li>scrub & disinfect sinks</li> <li>scrub & disinfect counters</li> <li>clean mirrors</li> <li>polish chrome</li> </ul> </div> </div>
i'm getting "stair" effect columns lower others reason. ideas?
here's demo
remove display: inline-block
each div , add
.listed div { float: left; }
to css
inline-block
default has 4px
of invisible margin around why in case have @ moment 25*4
= 100%+16px
Comments
Post a Comment