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 11 of 11
  1. #1
    New Coder
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    91
    Thanks
    21
    Thanked 0 Times in 0 Posts

    Desperate -> TD height 100%

    Okay guys,

    Decided to post this here since I have looked for tons of solutions, and hopefully one of you might have the correct answer. First, let's have a look at a small bit of my webpage:



    The part where it says "Hehe", that is the main content. Sometimes there will be loads of content, and sometimes there will not. However it will be, the left part, where it says "Test", needs to fill the white space. The image in the top left corner is my left menu. That is a fixed height. I only need to have the background image where it says "Test", set to 100%.

    For some reason, it just doesn't seem to go to 100% whenever the original height is "1". But ofcourse hopefully you guys will know all this already, and tell me what I should do. Any solution, HTML or CSS, is a good solution to me.

    My code for the TD:

    Code:
    <td background="images/test.png" width="180" height="100%">Test!!!</td>
    Thank you for your time to read my post

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    First, let's have a look at a small bit of my webpage:
    Can we have a link to your page? Are you using tables for making your layout?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    91
    Thanks
    21
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    Can we have a link to your page? Are you using tables for making your layout?
    No, I am working on it locally. And yes, I am using tables.
    Thank you for your time to read my post

  • #4
    Regular Coder
    Join Date
    Dec 2005
    Posts
    149
    Thanks
    12
    Thanked 0 Times in 0 Posts
    Hi,

    Just to confirm you want the "TEST" to be right at the top of the page?

    Can you also post your code, so we can look at it.

    Can you also post a screen shot of how you want it please./

    Thank you
    Tomorrow Could Be Your Day

  • #5
    New Coder
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    91
    Thanks
    21
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Genie1 View Post
    Hi,
    Just to confirm you want the "TEST" to be right at the top of the page?
    Not at all.

    I only need to have the background image where it says "Test", set to 100%.
    I only need the background image (where it says TEST), to be a 100%. Which means, the white is gone and that background image is at 100% height.
    Thank you for your time to read my post

  • #6
    Regular Coder
    Join Date
    Dec 2005
    Posts
    149
    Thanks
    12
    Thanked 0 Times in 0 Posts
    Hi,

    Okay i think i understand what you are saying, just to confirm that when you type "test" it brings white space, correct?

    Also any chance of seeing your code, as it seems to be done with CSS.
    Tomorrow Could Be Your Day

  • #7
    New Coder
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    91
    Thanks
    21
    Thanked 0 Times in 0 Posts
    I just typed "Test" for it to be visible, when I type nothing (and nothing needs to be typed) you can only see the background image with a 1pixel height, while it just needs to be a 100%. And there is no code to show, at least no more than the one in the first post:

    Code:
    <td background="images/test.png" width="180" height="100%">Test!!!</td>
    Thank you for your time to read my post

  • #8
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    And there is no code to show, at least no more than the one in the first post:
    I can't believe that the above snippet is your entire code, which is producing the output given in the OP
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #9
    New Coder
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    91
    Thanks
    21
    Thanked 0 Times in 0 Posts
    Ofcourse not, but the other code is useless, at it's not about that code, which are btw only <tr> and <td>'s. But to stop discussing that, here you go:

    Click for some examples

    Hopefully this will clear everything up. And if you need the code, you know how to get it
    Thank you for your time to read my post

  • #10
    Regular Coder
    Join Date
    Aug 2002
    Location
    San Francisco
    Posts
    455
    Thanks
    19
    Thanked 15 Times in 15 Posts
    It would seem like you need three images: one repeating image, a top image, and a bottom image. Via CSS put the repeating image on your body, the top image on your container div, and the bottom image on your footer.

    body { background: #000 url(images/whatever.jpg); margin: 0; padding: 0; }
    #container { background: url(images/top.jpg) no-repeat left top; }
    #footer { background: url(images/bottom.jpg) no-repeat left bottom; height: 75px;}

    OR

    If you don't mind your background distorting, here's how you can have it stretch: http://www.htmlite.com/faq022.php
    Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read. Groucho Marx

  • #11
    New Coder
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    91
    Thanks
    21
    Thanked 0 Times in 0 Posts
    Thanks, I've actually come up with a solution myself, which is just to leave some things from the layout, and simply use those as a body background. But thanks for the post, I will try this sometime to gain some more knowledge
    Thank you for your time to read my post


  •  

    Posting Permissions

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