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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    dynamic div with links

    i have index.php as the layout, and multiple links that include other content in page_content (articles/downloads/etc)

    Code:
    			<div id="page_content">
    			<?php $dc = $_GET['dc'];if(!empty($dc)){$dc .= '.php';include_once($dc);}else{include_once('articles.php');}?>
    			</div>
    Code:
    <li><a href="index.php?dc=articles">articles</a></li>
    <li><a href="index.php?dc=downloads">downloads</a></li>
    i need to be able to change the height of the div of page content for each link

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,466
    Thanks
    23
    Thanked 634 Times in 633 Posts
    A div adjusts it's height to the length of it's contents unless you have restricted it by giving it a fixed height. You can look to a css solution by using min-height instead.
    Or a height with overflow:auto;
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."


  •  

    Posting Permissions

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