Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS - float:left alignment issue
    primarykey
    data
    text
    <p>I am building a forum listing using DIVs and here is the one I have </p> <pre><code>/* forum like build */ .myForum{ float: left; width: 620px; margin-top: 10px; border: 2px solid #0F5C8E; padding: 1px; overflow: hidden; display: block; } .myForum &gt; .header { height:10px; background-color: #adcbe7; border-bottom: 1px solid #0F5C8E; font-weight: bold; padding: 2px; overflow: hidden; height:20px; } .myForum &gt; .myrow { padding-left: 0px; margin: 0px; border-bottom: 1px solid #0F5C8E; height:57px; background-color: #f5f5f5; } .myForum &gt; .myrow &gt; .photo { overflow: hidden; width:105px; float:left; text-align:center; padding-right: 2px; padding-top:2px; height:57px; } .myForum &gt; .myrow &gt; .content { padding-left: 3px; padding-right: 3px; overflow: hidden; width:450px; float:left; border-left: 1px solid #0F5C8E; border-right: 1px solid #0F5C8E; height:57px; } .myForum &gt; .myrow &gt; .mycount { padding-right: 1px; padding-bottom: 1px; overflow: hidden; float:left; height:57px; padding-left:3px; } .myForum &gt; .myrow &gt; .content &gt; a { color: #013E99; font: bold 0.8em/1.3 arial,helvetica,sans-serif; margin-top: 0; } .myForum &gt; .myrow &gt; .content &gt; p { font: normal 0.7em/1.3 arial,helvetica,sans-serif; margin-bottom:2px; color:#878787; } .myForum &gt; .myrow &gt; .content &gt; p &gt; a { color: #0066CC; margin-top: 0; } </code></pre> <p><a href="http://jsfiddle.net/ytAud/1/" rel="nofollow noreferrer">http://jsfiddle.net/ytAud/1/</a></p> <p>You can see alignment got messed up .</p> <p>If I add extra <strong>padding-top</strong> to the third div (<strong>.myForum > .myrow > .mycount</strong>) , the alignment works just fine . But that disturbs the vertical lines ( second vertical line). You can see the modified one below</p> <p><a href="http://jsfiddle.net/ytAud/2/" rel="nofollow noreferrer">http://jsfiddle.net/ytAud/2/</a></p> <p>(I thought of using tables, But I see latest sites started using DIVs even for listings)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload