I have a problem with the alignment of the image and content in a list What is my code:
& lt; Li & gt; & Lt; Div class = "small-view-image" & gt; & Lt; Img src = "../ images / xyz.png" height = "41" width = "34" alt = "test" title = "test" /> & Lt; / Div & gt; & Lt; Div class = "small-view-content" & gt; & Lt; A href = '.. / xyz.html' & gt; XYZ & lt; / A & gt; & Lt; / Div & gt; & Lt; / Li & gt; The problem is that I can not use the float left to align the image on the left and the content on the right.
This is the output that I expect. I can not use float: left, because the page is multilingual, welcome any suggestions or ideas.
Expand the answer of dylanfm with a tweak, your CSS will be:
li {status: relative; Min height: 50px; } .small-view-image {status: absolute; Left: 0; Top: 0; } .small-view-content {status: relative; Left: 40px; / * Creates room for image * /} will ensure that you & lt; Li & gt; Push the other page elements properly if the text is too long image.
Comments
Post a Comment