SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: border width

  1. #1
    SitePoint Zealot
    Join Date
    Feb 2009
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,176
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    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.

  3. #3
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,830
    Mentioned
    73 Post(s)
    Tagged
    6 Thread(s)
    How about setting the div {border-bottom:0} then use <hr style='width:50&#37;; margin:-1em auto 0' /> as the last line in your div?

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

    Code:
    <hr style="height:30px;width:50%; margin:-1em auto 0; background:#cfc" />
    .
    Last edited by John_Betong; Aug 26, 2010 at 09:17. Reason: spelling: not my fortey
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Patche on earning Member of the Month for July 2014

  4. #4
    SitePoint Zealot
    Join Date
    Jul 2010
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  5. #5
    SitePoint Zealot
    Join Date
    Feb 2009
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok image seems to make sense in this situation (it's not just a solid line). thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •