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. #2
    Master Coder sunfighter's Avatar
    Join Date
    Jan 2011
    Location
    Washington
    Posts
    6,430
    Thanks
    30
    Thanked 878 Times in 876 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.
    Physics is actually atoms trying to understand themselves.


 

Posting Permissions

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