SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Zealot NZ Joe's Avatar
    Join Date
    Apr 2001
    Location
    Kapiti, New Zealand
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    css column colours

    Yes that is how we spell colour in this part of the world, but that is not the issue. This is related to my previous question

    OK, here is the problem: I have three columns of information on a page, positioned within divs using css (code to follow). One contains more content than the other. The problem is that the background colour only fills to the bottom of the content, not to the bottom of the page. How can I make it go to the bottom, without going back to tables?

    HTML:
    Code:
    <div width="100%">
      <div class="leftnav">
        Navigation stuff goes here
      </div>
      <div class="bodytext">
        The main body text goes in here.  This is the heaps longer than the nav content
      </div>
      <div class="quicklinks">
        Some more stuff here
      </div>
    </div>
    CSS:

    Code:
    .leftnav{
        position:absolute;
        top:50px;
        left:0px;
        width:150px;
        background-color:#ececdd;    
        }
    
    .bodytext{
        position:absolute;
        top:60px;
        margin-left:165px;
        margin-right:160px;   
        }
    
    .quicklinks{
        position:absolute;
        top:60px;
        right:5px;
        }
    Thanks in advance.
    Gravity always wins

  2. #2
    Non-Member Siltrince's Avatar
    Join Date
    Aug 2001
    Location
    Belgium
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm not sure what you mean .>> i'm drunk
    but when you put css to an table , you have to put an css-style to the cell and you have to put a style to the link or text itself.

  3. #3
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try specifying height="100%" for each Div...or put <br> tags to force the DIV to be longer. Or you could put a transparent GIF and do the same thing.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  4. #4
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've had the same problem. Try using the #ececdd as the background and nesting the div's.

    Sorry if this is kind of lenghty:


    <html>

    <head>

    <style>
    body
    {
    background:#ececdd;
    margin:0px;
    }
    .leftnav
    {
    left:0px;
    position:absolute;
    top:50px;
    width:150px;
    }
    .notleftnav
    {
    background-color:#fff;
    height:100%;
    margin-left:165px;
    margin-right:0px;
    position:relative;
    top:0px;
    .bodytext
    {
    height:100%;
    padding-left:15px;
    padding-top:60px;
    padding-right:175px;
    position:relative;
    top:0px;
    }
    .quicklinks
    {
    margin:0px;
    padding-top:60px;
    position:absolute;
    right:0px;
    top:0px;
    width:160px;
    }
    </style>
    </head>

    <body>
    <div class="leftnav">Navigation stuff goes here</div>
    <div class="notleftnav">
    <div class="bodytext">
    <p>The main body text goes in here. This is the heaps longer than the nav content.
    <!--filler text-->
    <p>Whoa there! Halt! Who goes there? It is I, Arthur, son of Uther Pendragon, from the castle of Camelot. King of the Britons, defeator of the Saxons, sovereign of all England! Pull the other one! I am. And this my trusty servant Patsy.We have ridden the length and breadth of the land in search of knights who will join me in my court at Camelot. I must speak with your lord and master. What, ridden on a horse? Yes! You're using coconuts! What? You've got two empty halves of coconut and you're bangin' 'em together. So? We have ridden since the snows of winter covered this land, through the kingdom of Mercea, through-- Where'd you get the coconut? We found them. Found them? In Mercea? The coconut's tropical! What do you mean? Well, this is a temperate zone. The swallow may fly south with the sun or the house martin or the plummer may seek warmer climes in winter yet these are not strangers to our land. Are you suggesting coconuts migrate? Not at all, they could be carried. What -- a swallow carrying a coconut? It could grip it by the husk! It's not a question of where he grips it! It's a simple question of weight ratios! A five ounce bird could not carry a 1 pound coconut. Well, it doesn't matter. Will you go and tell your master that Arthur from the Court of Camelot is here. Listen, in order to maintain air-speed velocity, a swallow needs to beat its wings 43 times every second, right? Please! Am I right? I'm not interested! It could be carried by an African swallow! Oh, yeah, an African swallow maybe, but not a European swallow, that's my point. Oh, yeah, I agree with that... Will you ask your master if he wants to join my court at Camelot?! But then of course African swallows are not migratory. Oh, yeah... So they couldn't bring a coconut back anyway... Wait a minute -- supposing two swallows carried it together? No, they'd have to have it on a line. Well, simple! They'd just use a strand of creeper! What, held under the dorsal guiding feathers? Well, why not?</p>
    <p>Bring out your dead! Bring out your dead! Bring out your dead! Bring out your dead! Bring out your dead! Bring out your dead! Here's one -- nine pence. I'm not dead! What? Nothing -- here's your nine pence. I'm not dead! Here -- he says he's not dead! Yes, he is. I'm not! He isn't. Well, he will be soon, he's very ill. I'm getting better! No, you're not -- you'll be stone dead in a moment. Oh, I can't take him like that -- it's against regulations. I don't want to go in the cart! Oh, don't be such a baby. I can't take him... I feel fine! Oh, do us a favor... I can't. Well, can you hang around a couple of minutes? He won't be long. Naaah, I got to go on to Robinson's -- they've lost nine today. Well, when is your next round? Thursday. I think I'll go for a walk. You're not fooling anyone y'know. Look, isn't there something you can do? I feel happy... I feel happy. Ah, thanks very much. Not at all. See you on Thursday. Right. Who's that then? I don't know. Must be a king. Why? He hasn't got **** all over him.</p>
    <p>Whoa there! Halt! Who goes there? It is I, Arthur, son of Uther Pendragon, from the castle of Camelot. King of the Britons, defeator of the Saxons, sovereign of all England! Pull the other one! I am. And this my trusty servant Patsy.We have ridden the length and breadth of the land in search of knights who will join me in my court at Camelot. I must speak with your lord and master. What, ridden on a horse? Yes! You're using coconuts! What? You've got two empty halves of coconut and you're bangin' 'em together. So? We have ridden since the snows of winter covered this land, through the kingdom of Mercea, through-- Where'd you get the coconut? We found them. Found them? In Mercea? The coconut's tropical! What do you mean? Well, this is a temperate zone. The swallow may fly south with the sun or the house martin or the plummer may seek warmer climes in winter yet these are not strangers to our land. Are you suggesting coconuts migrate? Not at all, they could be carried. What -- a swallow carrying a coconut? It could grip it by the husk! It's not a question of where he grips it! It's a simple question of weight ratios! A five ounce bird could not carry a 1 pound coconut. Well, it doesn't matter. Will you go and tell your master that Arthur from the Court of Camelot is here. Listen, in order to maintain air-speed velocity, a swallow needs to beat its wings 43 times every second, right? Please! Am I right? I'm not interested! It could be carried by an African swallow! Oh, yeah, an African swallow maybe, but not a European swallow, that's my point. Oh, yeah, I agree with that... Will you ask your master if he wants to join my court at Camelot?! But then of course African swallows are not migratory. Oh, yeah... So they couldn't bring a coconut back anyway... Wait a minute -- supposing two swallows carried it together? No, they'd have to have it on a line. Well, simple! They'd just use a strand of creeper! What, held under the dorsal guiding feathers? Well, why not?</p>
    <p>Bring out your dead! Bring out your dead! Bring out your dead! Bring out your dead! Bring out your dead! Bring out your dead! Here's one -- nine pence. I'm not dead! What? Nothing -- here's your nine pence. I'm not dead! Here -- he says he's not dead! Yes, he is. I'm not! He isn't. Well, he will be soon, he's very ill. I'm getting better! No, you're not -- you'll be stone dead in a moment. Oh, I can't take him like that -- it's against regulations. I don't want to go in the cart! Oh, don't be such a baby. I can't take him... I feel fine! Oh, do us a favor... I can't. Well, can you hang around a couple of minutes? He won't be long. Naaah, I got to go on to Robinson's -- they've lost nine today. Well, when is your next round? Thursday. I think I'll go for a walk. You're not fooling anyone y'know. Look, isn't there something you can do? I feel happy... I feel happy. Ah, thanks very much. Not at all. See you on Thursday. Right. Who's that then? I don't know. Must be a king. Why? He hasn't got **** all over him.</p>
    </div>
    <div class="quicklinks">Some more stuff here</div>
    </div>

    </body>

    </html>

    This should work although if haven't looked at in anything other than IE 5.5. Post again if you've got any more trouble. I haven't been able to get to sitepoint from my home connection (ISP problems), but my email's still working.
    Last edited by isotope235; Sep 28, 2001 at 14:50.

  5. #5
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ack !

    I broke the forum layout. Sorry!

  6. #6
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    edit your post and remove the <code> tags.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  7. #7
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Batta-bing, that worked. Thanks Creole.

  8. #8
    SitePoint Zealot NZ Joe's Avatar
    Join Date
    Apr 2001
    Location
    Kapiti, New Zealand
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Isotope235,

    It wasn't quite what I was after, but it pointed me in the right direction.
    Gravity always wins

  9. #9
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad to help out.

    Can't wait to see the finished product!

  10. #10
    SitePoint Zealot NZ Joe's Avatar
    Join Date
    Apr 2001
    Location
    Kapiti, New Zealand
    Posts
    182
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unfortunatly I wont be able to show you. It's on our intranet. Government secrets etc. At least I have the luxury of only having to design for one browser and resolution.
    Gravity always wins


Bookmarks

Posting Permissions

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