prasanna2166 Posted December 5, 2014 Share Posted December 5, 2014 Hello Everyone, As I am a novice, posting this simple question. Am trying to design my first webpage using PHP. I have successfully created a wrapper page (index.php) as in the attachment whereas I get into trouble when I try to include PHP content pages into index.php. The real problem occurs in the alignment and not with the include command. The problem seems not to go away even if I match the height and width of #contentsize to #rcontent. PHP: <div id="rcontent"> <div id=contentsize> <?php include 'home.php'; ?> </div> </div> CSS: #rcontent { width:894px; height:530px; background-color:blue; float:right; border-color:white; border-width:5px 3px 5px 3px; border-style:solid; } #contentsize { width:894px; height:530px; } Could someone help me out? Expected Result: PHP contents should fit in blue box. Thanks in Advance!! Quote Link to comment Share on other sites More sharing options...
QuickOldCar Posted December 5, 2014 Share Posted December 5, 2014 The problem is you are setting a height and it follows that rule. If you want the content to continue try a min-height #rcontent { width:894px; min-height:530px; background-color:blue; float:right; border-color:white; border-width:5px 3px 5px 3px; border-style:solid; } #contentsize { width:894px; min-height:530px; } if you want to retain the content within that area try a max-height and overflow: auto; #rcontent { width:894px; min-height:530px; background-color:blue; float:right; border-color:white; border-width:5px 3px 5px 3px; border-style:solid; } #contentsize { width:894px; max-height:530px; overflow: auto; } just height overflow overflow-x: auto; just width overflowoverflow-y: auto; Quote Link to comment Share on other sites More sharing options...
Solution QuickOldCar Posted December 5, 2014 Solution Share Posted December 5, 2014 (edited) Mixed them up just width overflow overflow-x: auto; just height overflowoverflow-y: auto; Ohh, and make sure you quote your attributes <div id="contentsize"> Edited December 5, 2014 by QuickOldCar Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.