I'm trying to move from using tables for layout in favours of divisions.
A while ago I got about halfway there using absolute positioning. The problem I had was having a main content area that didn't have a fixed height (for dynamic content) and then being able to put the footer (copyright) bar below it.
I used tables for the content and footer and then absolutely positioned everything else.
Death Slaught offered to help me out with this.
What I'd like is something like this:
(I hope it's alright the use CODE tags to get the positioning correct).
I'm using CSS to position the elements. The kind of code layout I'd like the acheive is something like this:
I was wondering if someone could let me know the CSS absolute positioning that would allow me to have the content having a minimum height but no maximum limit. To put the footer below it, and the allow the sub menu down the side to be the same height as the content even if it has very few sub menu item in it.
The kind of CSS code I'm using at the present runs along these lines:
If anyone could help me I'd be really grateful.
A while ago I got about halfway there using absolute positioning. The problem I had was having a main content area that didn't have a fixed height (for dynamic content) and then being able to put the footer (copyright) bar below it.
I used tables for the content and footer and then absolutely positioned everything else.
Death Slaught offered to help me out with this.
What I'd like is something like this:
(I hope it's alright the use CODE tags to get the positioning correct).
Code:
+-------------------------------------------------------+ | +-----------------------+| | BANNER | HEADER || | +-----------------------+| +-------------------------------------------------------+ | MAIN MENU | +-------------+-----------------------------------------+ | SUB MENU | MAIN CONTENT | | | | | | | | | | | | | | | | | | | +-------------+-----------------------------------------+ | FOOTER | +-------------------------------------------------------+
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>title</title> <meta name="description" content="description"/> <meta name="keywords" content="keywords"/> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <meta http-equiv="imagetoolbar" content="no"/> <link rel="stylesheet" href="/css/style.css" type="text/css"/> <link rel="stylesheet" href="/css/template.css" type="text/css"/> <script type="text/javascript" src="/js/javascript1.js"></script> <script type="text/javascript" src="/js/javascript2.js"></script> <script type="text/javascript" src="/js/javascript3.js"></script> <script type="text/javascript" src="/js/javascript4.js"></script> <script type="text/javascript" src="/js/javascript5.js"></script> <script type="text/javascript" src="/js/javascript6.js"></script> <link rel="shortcut icon" href="favicon.ico"/> <link rel="icon" type="image/gif" href="animated_favicon1.gif"/> </head> <body> <div id="page"> <div id="content"> CONTENT </div> <div id="copyright"> Copyright © date-<?=date(Y);?> ABC Ltd.. All rights reserved </div> <div id="banner"> <img alt="banner" src="/images/banner.jpg"/> </div> <div id="header"> 01123 456789 </div> <div id="main_menu"> <?php include "main_menu.php"; ?> </div> <div id="sub_menu"> <?php include "sub_menu.php"; ?> </div> </div> <? include "analytics.php"; ?> </body> <br/> </html>
The kind of CSS code I'm using at the present runs along these lines:
Code:
#banner { position: absolute; top: 0px; left: 0px; width: 980px; height: 145px; }
Comment