html - How to have 2 adjacents blocks without display:inline-block? -
I'm spending hours on it ... no success.
Since the inline block is not well supported by IE 6 and 7, I want to know that it is possible to use the other attributes given by the following code:
& Lt; Html & gt; & Lt; Head & gt; & Lt; Style type = "text / css" & gt; .img {float: left; Width: 17px; Height: 15px; Display area; Background color: # FD3; Border style: solid; } .txt {float: left; }. Parent {display: inline-block} & lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; Me & lt; Div class = "parent" & gt; Follow & Lt; Div class = "img" & gt; & Lt; / Div & gt; & Lt; Div class = "img" & gt; & Lt; / Div & gt; & Lt; Div class = "txt" & gt; (One comment) & lt; / Div & gt; K & lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;
Caution: I can not add / change the container of "follow me" (for example a float: left
).
Thx
Do you have an alternative solution?
Basically, inline blocks works in IE6 and IE7, just in a weird way.
Actually, implementing IE6 and IE7 inline is wrong when layout of a naturally inline element (for more information on that "Google for Layouts") it is an inline block element And will respect the width / height on it.
So swap those people & lt; Div class = image> s with & lt; Span> s so that they are inline inline, and then what you have to do is trigger them, and you're good to go is my normal way of setting a "zoom: 1" property on elements - it's just a IE -All that will do nothing, but it will trigger.
Definitely a better solution, if only & lt; Img> use elements, if it is possible.
Comments
Post a Comment