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 6 of 6
  1. #1
    New Coder
    Join Date
    Sep 2004
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Div stretches to bottom of screen,

    hi on my site www.majd-gfx.com , the content div stretches to the bottom of the div and not just the content height, how can i prevent that? i have looked at my css many times but i couldn't figure out what was going wrong, all the opened divs are being closed and the content div does not specify any height so it should only stretch to the content height.

  • #2
    New to the CF scene
    Join Date
    Oct 2004
    Location
    The far side of the moon. Or San Diego. Whichever you prefer.
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb You have two open div tags...

    First, let me say that you might find this all easier if you'd just give in and use a table for all the aligning. I just had to say that, is all.

    In the mean time, I'm looking at two unclosed div tags that could be the culprits (in fact, upon further consideration, I think they probably are).

    You defined background color in three separate divs in which you have your content (the ones with the paragraph in Latin). On the third and last of these, you closed the div tag defining it's background color. On the first two, you did not. I would start by closing those.

    If that doesn't pan out (although I think it will), you might want to double check not -if- but -where- you've closed your tags. Sometimes I will accidentally close a tag in the wrong place and everything will go massively awry on the page.

    So remember that! If something's gone wrong (especially with alignment or dimensions), you've probably overlooked something obvious, but you've looked at your code so many times your eyes are skimming right over it. I can't tell you how many times I've driven myself to distraction with something like that, only to come back to it later and immediately spot the problem.
    Sugar and Spice and Everything Nice,
    Candied RAM

    Candy is dandy but liquor is quicker - Willy Wonka

  • #3
    New to the CF scene
    Join Date
    Oct 2004
    Location
    The far side of the moon. Or San Diego. Whichever you prefer.
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Oops, make that three...

    Also the div tag defining the background of the line that contains the phrase I am just testin out the layout.... is unclosed.

    Okay, that's all I see but you might want to hunt around for any more along those lines.
    Sugar and Spice and Everything Nice,
    Candied RAM

    Candy is dandy but liquor is quicker - Willy Wonka

  • #4
    Regular Coder
    Join Date
    Aug 2004
    Location
    The US of A
    Posts
    767
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Ignore Candied, has no idea what he's talking about. And just so you know, there are are about five unclosed DIV's in the main page. The seperate updates, and the DIV's that contain them.

    http://validator.w3.org/check?uri=ht...ajd-gfx.com%2F

    Your page is, in fact, not valid HTML 4.01.

  • #5
    New Coder
    Join Date
    Sep 2004
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts
    oh i didn't realize, thank you

    what was happenin was that on my included show_news.php , the closing of the div was a seperate echo and it wasn't being printed. i fixed it now thank you guys.

  • #6
    New to the CF scene
    Join Date
    Oct 2004
    Location
    The far side of the moon. Or San Diego. Whichever you prefer.
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation How nice you are, Kurashu...

    First of all, I'm a she.

    Second, do you think it's even vaguely possible that you could try being pleasant before harshly judging someone?

    If you'll look at Majd-GFX's response, you'll see I was right (and first) as to why he was having a problem. I also identified where the problem was happening.

    As did you. So we actually agreed on the most important point.

    Do you think it's even remotely possible that I was, gasp, perfectly correct and you simply misunderstood me on another point?

    Perhaps it was my where not if statement that confused you? I can see where it might. My intent was not where on the page, but rather where in relation to other tags. For instance... if you closed a table tag before closing the table cell tag, it could very easily result in a layout problem.

    Granted, his page is laid out using div tags, but still I thought it worth mentioning, because I've helped my friends with their webpages so many times and seen many errors along those lines (as well as missed closing tags), and I didn't exactly go over his source with a fine-tooth comb. Of course he didn't miss them, the echo wasn't printing them out (which didn't even occur to me, which was admitedly a brain fart) but I still pointed out where the problem was occuring.

    I mentioned overlooking small errors because it's true. Most errors that cause major problems are very minor, and just come from not noticing something. So I thought I'd point that out.

    Everything I said may not have been worded as perfectly as it might have been (hey, I was sleepy) but none of it was incorrect and certainly not stupid, even if you did misunderstand it.

    I don't know if you thought it would be OK to be rude because I'm a newbie to these forums and you're an old hand, or if you just don't like giving people a chance. You're entitled to your opinion, but maybe you should just consider politely giving people a chance to clarify before you judge them to be below you.
    Last edited by Candied_RAM; 10-10-2004 at 09:40 AM. Reason: Mistated something.
    Sugar and Spice and Everything Nice,
    Candied RAM

    Candy is dandy but liquor is quicker - Willy Wonka


  •  

    Posting Permissions

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