Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2007
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Showing a Border in DIVS

    Hi,

    How would I show a border in grey in a DiV? Everything i tried does not show a border.
    This is my code:

    Code:
    <div style="width: 416px; position:absolute; left: 187px; top: 48px; border:1px; border-color:#999999;">
    				<strong>Lm 117.80  /  274.40 ex Vat <br />
    					Lm 139.00 /  323.78 inc Vat</strong>
    				<img style="float:right; position:absolute; left: 233px; top: 5px;" alt="" src="images/backtoproductlist.png" width="180" height="19" /></div>
    Thanks

  • #2
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    try

    Code:
    border : 1px solid #999999;
    instead of
    Code:
    border:1px; border-color:#999999;
    I always use imported stylesheets so maybe that won't work when it's in the html file but it's worth experimenting.

    bazz

  • #3
    Regular Coder
    Join Date
    Feb 2007
    Location
    Seattle
    Posts
    153
    Thanks
    5
    Thanked 9 Times in 9 Posts
    The attribute you are missing is the line type: solid, dashed, ridge, whatever you want it to look like. You get nothing unless you declare it.

    Gary


  •  

    Posting Permissions

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