www.webdeveloper.com
Results 1 to 5 of 5

Thread: classes or id??? for beginers

  1. #1
    Join Date
    Jun 2004
    Posts
    54

    Question classes or id??? for beginers

    Hi all,

    I have a table that i would like to add a style to it. I have allready got an external css.
    Am i correct by saying...

    <table CLASS="heading">

    and then in my css...

    .heading {
    border: 0px none;
    text-align: left;
    padding: 0px 0px 0px 0px;
    width: 100%;
    vertical-align: middle;
    }

    or is there a better way of doing this?

    By the way i've tried it in IE6 and firefox 1pr and none of it works.

    All help apreciated
    For all your computer and table top gaming needs in Melbourne, Australia, head over to North Eastern Gaming Arena

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    It does work, well the border and width will, the rest is not applicable to table.

  3. #3
    Join Date
    Jun 2004
    Posts
    54
    Thanks Fang

    How do i make the content inside the cell vertically aligned to the middle???

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Apply it to the cell:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <title>table style</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
    <style type="text/css">
    <!-- 
    .heading {
    border: 0px none;
    width: 100%;
    }
    .heading td {
    text-align: left;
    padding: 0px;
    vertical-align:middle;
    } 
    -->
    </style>
    
    </head>
    <body>
    <table class="heading" summary="">
    <tr><td>xxxx</td><td>xx<br />xx</td></tr>
    </table>
    
    </body>
    </html>

  5. #5
    Join Date
    Jun 2004
    Posts
    54
    thanks
    worked a treat
    told you I am a beginner
    Later

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