Results 1 to 8 of 8

Thread: CSS table error

  1. #1

    Thread Starter
    Addicted Member kikelinus's Avatar
    Join Date
    Nov 2000
    Posts
    219

    Unhappy CSS table error

    I'm not really a fan of CSS, actually, I've never used it, so I'm not sure if this is a common problem.

    I have the following code:
    <style>
    H1 {
    font-family : Arial;
    color : #FFFFFF;
    text-align : left;
    font-weight : bold;
    font-size : 12px;
    }
    </style>

    I am using it as a title in a table, like this:
    --------------
    |Title...........|
    --------------
    |..................|
    |..................|
    |-------------|

    The problem is that, when I use this code (<h1>Title</h1)), the header part of my table seems to come down, as if a new paragraph had been added, so it ends up like:
    --------------
    |Title............|
    |..................|
    --------------
    |..................|
    |..................|
    |-------------|

    as if there were 2 rows.
    Any help is appreciated. Thanks

    BTW: the "......." represent open space, I had to use it so it would display right on this forum.

  2. #2
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    Maybe it has something to do with your font. Try changing the bold and size (headers wont change anyways as far as I know).

  3. #3

    Thread Starter
    Addicted Member kikelinus's Avatar
    Join Date
    Nov 2000
    Posts
    219
    Do you think I need to add some configuration in the "P" tag?

  4. #4
    Member
    Join Date
    Jan 2003
    Posts
    44
    Can we see the code for your page? It's quite possible there is some unintentional white space that gets moved to the next line when the font size is increased or bolded.

    I'm not really a fan of CSS, actually, I've never used it
    Once you really learn it and use it fully, you'll never want to go back. CSS is one of the best things that has happened to the Web.

  5. #5

    Thread Starter
    Addicted Member kikelinus's Avatar
    Join Date
    Nov 2000
    Posts
    219
    This is the code I have:
    Code:
    <html>
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Agenda Universal</title>
    <style>
    P {
    font-size : 13px;
    font-family : Arial;
    color : #000000;
    text-align : left;
    margin : 0;
    } 
    
    TABLE {
    font-family : Arial;
    color : #000000;
    text-align : left;
    font-size : 13px;
    }
    
    H1 {
    font-family : Arial;
    color : #FFFFFF;
    text-align : left;
    font-weight : bold;
    font-size : 13px;
    } 
    
    BODY {
    font-size : 13px;
    font-family : Arial;
    color : #000000;
    } 
    
    A:hover {
    font-weight : normal;
    font-size : 13px;
    font-family : Arial;
    color : #000000;
    background : #000000transparent;
    text-decoration : none;
    }
    </style>
    </head>
    
    <body bgcolor="#666666">
        <table border="1" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber4">
          <tr>
            <td width="100%" bgcolor="#8AB7DD">
            <h1>Bienvenidos</h1></td>
          </tr>
        </table>
    </body>
    </html>

  6. #6
    Member
    Join Date
    Jan 2003
    Posts
    44
    Add
    Code:
    margin: 0px;
    to your H1 style definition.

  7. #7

    Thread Starter
    Addicted Member kikelinus's Avatar
    Join Date
    Nov 2000
    Posts
    219
    It works perfectly now.
    Thanks everyone.

  8. #8
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    By the way you need type="text/css" in with that <style> tag.

Posting Permissions

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



Click Here to Expand Forum to Full Width