mattal999 Posted April 27, 2009 Share Posted April 27, 2009 I have this code: <span style="float:right;width:150px;height:100%;padding-left:10px;border-left:1px dotted #3d3d3d;"> Which SHOULD make the span 100% of the div. Of course, it only displays the border up to the point where the text in the span goes up to. I need to make this longer than it currently is, and go to the height of the other span. The other span contains a lot of dummy text, which is a lot longer than this span. The actual page: http://iwantthatone.comuf.com/modules/scrapz/ Thanks Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted April 29, 2009 Share Posted April 29, 2009 span is inline. It will only take up the amount of space the text takes up. Make sure you declare - "display: block;" to make it expand to your desired width/height. Edit - you have float: left; which "implies" display: block;" therefore putting the display declaration is unnecessary but a good practice. I don't like the use of <span> in this scenario. Span is inline and should only be used to style text color, font-weight, or other text feature. If you want to lay things out, use a block level tag such as <p> or <h1> or <div>. What exactly do you want to accomplish? Floating something to the left will always shrink wrap it, unless you specify a width. Quote Link to comment Share on other sites More sharing options...
mattal999 Posted April 29, 2009 Author Share Posted April 29, 2009 Well, I managed to make it work with a table, as seen here. I will probably re-do the layout using divs, as tables are a thing of the past, but it will suffice for now. Thanks for your definitions though. 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.