believeinsharing Posted August 13, 2012 Share Posted August 13, 2012 Hi, I have one one span with id="imgPart" and div with id="infoPart". I am using span to show img and div to display text, If info is more (height is more than img height) page looking good but if text is short than other divs are coming up with img level. I would love to adjust the height of div with height of span(containing ) img. thx in advance Quote Link to comment Share on other sites More sharing options...
Christian F. Posted August 14, 2012 Share Posted August 14, 2012 I might be misunderstanding your post somewhat, but it sounds like you're looking for "faux CSS columns". I recommend a google search for it, to find many good guides on how to accomplish this. Quote Link to comment Share on other sites More sharing options...
Mahngiel Posted August 14, 2012 Share Posted August 14, 2012 spans are inline elements, meaning they do not obey the box model IMO you have things backwards and you should be using the span for the text either way, you can force a span to follow the box model and accept sizing properties by setting its display to block Quote Link to comment Share on other sites More sharing options...
believeinsharing Posted August 14, 2012 Author Share Posted August 14, 2012 thx for ur reply My code is <h4 class="blogTitle"> <span style="float: right; width:auto;height:auto;">7</span> <a href="blogPage.php?srNo='.$row['srNo'].'">Title</a> </h4> <div id="blogBody"> <span style="float: left; padding:0px 10px 5px 0px;"><img src="C:\Users\Desktop\New folder\img\2.jpg"/></span> <div id="blogText">This is info</div> </div> <div id="jump-link"><a href="blogPage.php?srNo='.$row['srNo'].'"> See more...</a></div> <div id="blogFooter"> <div id="blogFooterLine1"> <span class="postAuthor">POSTED BY:</span> </div> </div> In above code i wanted to display img and div "blogText" side by side and div "jump-link" should be below img but i am case everything is right hand side of img Quote Link to comment Share on other sites More sharing options...
believeinsharing Posted August 14, 2012 Author Share Posted August 14, 2012 I just need to add <br clear="left" /> it break thn seq n div is nw in next line thx for all help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.