Border width

i’m looking for a way to make a border not extend the full length of a div

if the div is 500px wide, i’d like the bottom border to extend 300px.

the border-width css property doesn’t do that - just the thickness of the line.

ok image seems to make sense in this situation (it’s not just a solid line). thanks!

I agree with ralph.m: use a image. Maybe background image. Also you could use an extra element (maybe an inner div, with an absolute position). To do that you must use position relative for the parent

How about setting the div {border-bottom:0} then use <hr style=‘width:50%; margin:-1em auto 0’ /> as the last line in your div?

<hr /> can be styled - see http://w3schools/com, etc

<hr style="height:30px;width:50%; margin:-1em auto 0; background:#cfc" />


I think I’d just use an image. I’ll never say something’s impossible (as long as Paul O’Brien and his merry band of magicians are around) but it’s not something I’ve seen done.