29 users online (1 members and 28 guests)  


Page 1 of 2 1 2 Last
  Results 1 to 15 of 18

Related

  1. Replies: 8
  2. Problem with the Australian site, without ".com.au" domain.    Forum: Search Engine Optimization - SEO - Forum
    Replies: 2
  3. Replies: 1
  4. Height="100%" PROBLEM :(    Forum: General Discussion
    Replies: 1
  5. problem with "<" and &lt;    Forum: HTML Forum
    Replies: 1
  1. #1
    ||-KeviN-||'s Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2003
    Posts
    9

    Height="100%" PROBLEM :(

    Hi there plz help me out with this stupid problem

    <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
    <tr><!-- Row 1 -->
    <td height="30" bgcolor="black">&nbsp;</td>
    </tr>
    <tr>
    <td height="30" bgcolor="red">&nbsp;</td>
    </tr>
    <tr>
    <td height="100%" valign="top">
    <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
    <tr>
    <td bgcolor="green">&nbsp;</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>

    Now why isn't the green TD 100% height :'( pleeeaaassseee tell me..

    Why doesn't netscape and opera accept this ?
    IE does

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Moving post to correct forum...
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Checking the HTML spec, there is no height attribute. If you ran that code through a validator it would fail because of it.

    I hate to recommend it, but for a production site you may be better off using spacer gifs to 'stretch' your cells.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  4. #4
    ||-KeviN-||'s Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2003
    Posts
    9
    @QuietDean:
    First of all, sorry for posting this is the wrong forum Im new here so i was not sure where to post.

    Yeah normaly i use spacer gifs to 'stretch' my cells. But with a 100% height itīs hard to do i gues...
    You say "there is no height attribute" what do you mean with that ?
    Then how am i able to have a 100% td in this situation ?
    I just want to know why the green <td> isn't 100% in netscape. And what i should change

    Thanks already.

    ps.
    Im sorry for my bad english

  5. #5
    Android's Avatar

    Status
    Offline
    Join Date
    Oct 2002
    Location
    I AM CANADIAN
    Posts
    440
    If you use:
    Code:
    <style>
    body {margin:0px;}
    </style>
    in the head, it will remove the white spacing around the table. Some browsers don't like the mixture of absolute units with percentages (I guess it leaves too much in the air for browsers to calculate.......)
    Also, you should use units. td height=30 might not mean anything to some browsers, and from W3C Schools:
    The "bgcolor", "height", "width", and "nowrap" attributes of the td element were deprecated in HTML 4.01.
    so you should avoid using them. Try putting a div inside the td and styling the height of the div instead. Or go all the way and use CSS to layout the page.

  6. #6
    ||-KeviN-||'s Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2003
    Posts
    9
    thank you so much Im feeling 200% smarter already hehe.I din't knew those primairy attributes were deprecated in HTML 4.01.
    I gues making up my layout with use of css would not be a bad idea...tho i found some problems with css and netscape aswell :@

    What did you mean with "you should use units" ??

    Thankz for your reply

  7. #7
    Android's Avatar

    Status
    Offline
    Join Date
    Oct 2002
    Location
    I AM CANADIAN
    Posts
    440

    Talking

    Quote Originally Posted by ||-KeviN-||
    What did you mean with "you should use units" ??
    When setting dimensions for something, rather than say =30, you should put some kind of unit to describe 30units. Otherwise, you'll be leaving it up to the browser to determine 30whatevers.
    Example:
    Incorrect:
    <table><tr><td width="30">content</td></tr></table>
    Correct:
    <table><tr><td width="30px">content</td></tr></table>
    <table><tr><td width="30%">content</td></tr></table>
    This concept is, however, rather moot, as this method is deprecated.
    Use CSS instead:

    <table><tr><td style="width:30px;">content</td></tr></table>

    Or use style classes:
    put
    <style>
    td.top {width:30px;}
    </style>

    in the head, and use the form of
    <table><tr><td class="top">content</td></tr></table>

    in the body of the document. For every td that you want to be 30px wide, just use "class=top" in that td tag.

  8. #8
    ||-KeviN-||'s Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2003
    Posts
    9

    Cool !

    Yea never looked it that way.

    This is netscape proof ?most importand to me
    I want my websites compatible with all kind of browser.

  9. #9
    ||-KeviN-||'s Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2003
    Posts
    9
    ok lett me ask it like this...
    Can you please edit my html to a correct version wich will be compatible with all browsers.

    I just wanna know how i can make a nestled table 100% height
    I want the green TD 100% high ! thanks

  10. #10
    Android's Avatar

    Status
    Offline
    Join Date
    Oct 2002
    Location
    I AM CANADIAN
    Posts
    440

    Talking

    Quote Originally Posted by ||-KeviN-||
    ok lett me ask it like this...
    Can you please edit my html to a correct version wich will be compatible with all browsers.
    LOL Easier said than done......
    Which versions of browsers? Netscape 4.x has trouble with CSS. Which doctype? (HTML 4, 4.1, XHTML? STRICT? Transitional?)
    Making it compatable with ALL possibilities can take some time.....

  11. #11
    ||-KeviN-||'s Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2003
    Posts
    9

    Cool you and me...great future :D

    hmm,
    lets say, compatible with netscape 6, IE 5up, and i gues opera will do the same as netscape ?

    i never inserted wich doctype im using. Is that nessecary ? HTML 4 , 4.1 ?? will there be a difference ?
    Transitional?
    STRICT ?
    Yet im not programming in xhtml. But i gues i should.

    Man i sell websites above 5000 euro's to company's and im still f*cking around with stupid html
    My websites look great in IE 6 tho
    But it's time to do something about my compatible powerrr Im so happy your here android !!
    You and me...will have a great future

    Thankz already.

    Lets see if you can make a nestled table 100% high.

    www.extrememedia.nl
    my company website. As you will see...NOT compatible with netscape or any other browser. wich is a shame

  12. #12
    Android's Avatar

    Status
    Offline
    Join Date
    Oct 2002
    Location
    I AM CANADIAN
    Posts
    440

    Talking Pour vous.....

    I don't know just what you're trying to achieve. Is you current layout flexible?
    Here's one attempt I whipped up. I've use green as a background colour for the body with no margins and two div's with black and red backgrounds. The black and red div's have no height attribute, so they're expandable dependant on their contents:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>Temaplate!</title>
    <style type="text/css">
    <!--
    body {
    background-color:#00ff00;
    }
    .black {
    background-color:#000000;
    width:100%;color:#ff0000;
    }
    .red {
    background-color:#ff0000;
    width:100%;
    }
    -->
     </style>
    </head>
    <body style="margin:0px">
    <div class="black">
    Black Bar on Top....
    </div>
    <div class="red">
    Red Bar under Black Bar
    </div>
    <div>
    Green background filling up the rest of the page.
    <br />
    This page is valid XHTML 1.0 Strict.
    </div>
    </body>
    </html>
    Is this kind of what you're looking for?

    NOTE: Doctype is XHTML 1.0 STRICT (I had to cut/paste it from something else. I would recommend HTML 4.1 Transitional or Strict, unless you're creating an XML application (Like I know what I'm talking about!
    Something for you to play with, anyway.......

  13. #13
    ||-KeviN-||'s Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2003
    Posts
    9
    This was/is not what i am looking for.
    Becuase...the green color is from the body background.
    Then it's normal it's 100% height
    By the way, this was also possible with tables
    real problem is...nestled tables.

    So what if i want to spit the green color in too colors ?
    top = black & red
    then you get left green and right yellow.
    How would you do that ? Solution would be colspan and rowspan i gues...But that would take me hourhs
    Becuase this is a easy example, but normaly i will have 50 nestled tables.

    I wanna know how i can fill 100% height.

    Thankz for code anyways m8, i still think we could have a great future

  14. #14
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    Quote Originally Posted by ||-KeviN-||
    Solution would be colspan and rowspan i gues...But that would take me hourhs
    You have answered your own question

    Dave

  15. #15
    ||-KeviN-||'s Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2003
    Posts
    9



Page 1 of 2 1 2 Last

Tags for this Thread