Jump to content

[SOLVED] Making a span height 100% of the div...


mattal999

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.