www.webdeveloper.com
Results 1 to 8 of 8

Thread: text on table border using css

  1. #1
    Join Date
    Jun 2007
    Posts
    8

    text on table border using css

    Hi I ahve one difficulty.
    I have to put text on table border as a header as shown in the attachment
    Is it possible using css, if anybody can provide solution on this?
    Attached Images Attached Images

  2. #2
    Join Date
    Mar 2007
    Location
    Orlando
    Posts
    670
    The legend tag does that...
    Code:
    <legend>Create your free quote</legend>

  3. #3
    Join Date
    Feb 2005
    Location
    Tauranga
    Posts
    2,062
    With using <fieldset></fieldset> also.
    Quote Originally Posted by jasonahoule
    The legend tag does that...
    Code:
    <legend>Create your free quote</legend>

  4. #4
    Join Date
    Jun 2007
    Posts
    8

    text on border

    No, It doesnt give the way I want

    I have attached another file to get proper view
    text is on the table border Its not up on the border
    It on the border only. If you see clearly
    <legend> doesnt work

  5. #5
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Here's a fragment that might give you some ideas.
    HTML Code:
    <style type="text/css">
    table,tr,td { border-collapse:collapse; border: 1px solid gray; }
    table { width: 50%; }
    td { width:10em; text-align:center }
    td.theading { width: 100%; }
    h2 { width:50%; text-align:center; margin-bottom: -.5em; }
    </style>
    </head>
    <body>
    <h2>about this table</h2>
    <table summary="table summary">
    <tr><td class="theading" colspan="3">&nbsp;</td></tr>
    <tr><td>now</td><td>is the</td><td>time</td></tr>
    <tr><td>now</td><td>is the</td><td>time</td></tr>
    <tr><td>now</td><td>is the</td><td>time</td></tr>
    </table>

  6. #6
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    editing: nice suggestion from Ray
    Last edited by WebJoel; 06-22-2007 at 06:08 PM.

  7. #7
    Join Date
    Jun 2007
    Posts
    8
    Thanks, it works

  8. #8
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    --I was working on an alterior example but it wasn't working as nicely as Ray's, hence the abridged-edited post two up as I got called away for some time and knew I wasn't going to be back before the 30-min deadline for re-editing...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles