28j63o47w3rxfwk8 Posted September 11, 2009 Share Posted September 11, 2009 Is it possible to make one group of text/images wrap around another group? Like text wraps around an image? I have two "columns" of text/images of much different lengths, and I would like the longer one to fill the entire width available below the shorter one.I am working on this: http://www.catsociety.org/info/#fosterI've tried to do it with tables using SPAN, but couldn't get it to work for a row and a column simultaneously. Maybe there's a way with DIV that I haven't discovered... Link to comment Share on other sites More sharing options...
Ingolme Posted September 11, 2009 Share Posted September 11, 2009 Put some content inside a <div> element. Assign a width and height to the <div>. Use the CSS float property on the <div> and then put the rest of the content after it.Here's an example: <div class="box1">Text<img src="something" alt="alt"></div>Some more content<div>A random block element</div> .box1 { width: 200px; border: 1px solid; float: left;} Link to comment Share on other sites More sharing options...
ravenshade Posted September 12, 2009 Share Posted September 12, 2009 I thought span was deprecated? Anyway, div tags are ideal for this situation and it's really the "float" syntax you're looking for. "float:left" positions the image to the left of the text and wraps the text around it. "float:right" does the same but on the other side. I'm pretty sure that the wrap syntax can be used as well, but by default its on so that shouldn't matter. Link to comment Share on other sites More sharing options...
thescientist Posted September 12, 2009 Share Posted September 12, 2009 I thought span was deprecated?really? I didn't think so. It still passed validation last time I checked. (which was about two seconds ago, haha ) Link to comment Share on other sites More sharing options...
28j63o47w3rxfwk8 Posted September 12, 2009 Author Share Posted September 12, 2009 Sweet! Thank you very much! Link to comment Share on other sites More sharing options...
ravenshade Posted September 13, 2009 Share Posted September 13, 2009 really really odd...my tutor said it was deprecated... then again, he could be wrong but yeah, someone change the subject head to resolved. Link to comment Share on other sites More sharing options...
Ingolme Posted September 13, 2009 Share Posted September 13, 2009 <span> isn't deprecated, it's a basic inline element.The only tags that are deprecated are ones that are used for presentation, such as <font> and <center>, which can be substituted with CSS.<span> tags are used in conjuction with CSS, so it would be foolish to deprecate it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.