473,785 Members | 2,651 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

100% height and footer at bottom

4 New Member
Hello All,

I have some problems making the columns 100% and forcing the footer at the bottom. Please refer to the code below and let me know a solution:

HTML CODE:[html]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/templatetest.dw t" codeOutsideHTML IsLocked="false " -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet " href="styleshee ts/styleinnertest. css" type="text/css"/>

</head>
<body>
<div id="maincontain er">
<div id="topcontaine r">
<div id="navcontaine r">
<div id="nav">
</div>
</div>
</div>
<div id="videocontai ner"></div>
<div class="containe r">
<div id="lefttcontai ner"></div>
<div id="contentbox" >
<div class="text"></div>
</div>
</div>
<div class="credits" id="footer">zx, c,c,zxc,zx,czx, c,zcz</div>
</div>
</body>
<html>[/html]

And this is the CSS CODE:
Expand|Select|Wrap|Line Numbers
  1. html, body{height:100%;} 
  2. html,body {margin:0;padding:0; background-color:#000;}
  3. #maincontainer
  4. {
  5.     background:url(../images/bg.gif);
  6.     height:100%;
  7.     width:975px;
  8.     margin-left:auto;
  9.     margin-right:auto;
  10.     position:relative;
  11.     z-index:4;
  12. }
  13. #topcontainer
  14. {
  15.     background:url(../images/navbg.gif) no-repeat;
  16.     position:relative;
  17.     width:968px;
  18.     height:116px;
  19.     padding:0;
  20.     left:3px;
  21.     top:-8px;
  22.     z-index:3;
  23. }
  24.  
  25. #navcontainer{
  26.     position: relative;
  27.     width: 968px;
  28.     height: 33px;
  29.     padding: 0;
  30.     margin: 0 0 10px 0;
  31.     z-index:2;
  32. }
  33. #videocontainer
  34. {
  35. background:#ffffff;
  36. position:relative;
  37. width:968px;
  38. height:238px;
  39. padding:0;
  40. left:3px;
  41. top:-4px;
  42. z-index:0;
  43. }
  44. .container
  45. {
  46. height:100%; /* IE6: treaded as min-height*/
  47. min-height:100%; /* real browsers */
  48. background:url(../images/bg.gif);
  49. padding-bottom:25px;
  50. }
  51.  
  52. #contentbox
  53. {
  54.     background:#FFFFFF;
  55.     position:relative;
  56.     float:left;
  57.     width:713px;
  58.     height:100%;
  59.     padding:0;
  60.     left:2px;
  61.     top:0px;
  62. }
  63. .text
  64. {
  65.     position:relative;
  66.     float:right;
  67.     width:700px;
  68.     height:auto;
  69.     padding:0;
  70.     top:270px;
  71.     right:3px;
  72.     font-family:Arial;
  73.     color:#666666;
  74.     font-size: 75%;
  75.     font-weight:normal;
  76. }
  77.  
  78. #lefttcontainer
  79. {
  80. background:url(../images/home_leftnavtop.gif) top no-repeat;
  81. background-color:#FFFFFF;
  82. position:relative;
  83. width:250px;
  84. height:100%;
  85. float:left;
  86. top:-3px;
  87. margin:3px;
  88. }
  89.  
  90. #footer
  91. {
  92.     background:#000000;
  93.     position:absolute;
  94.     bottom:0;
  95.     width:100%;
  96.     height:25px;   /* Height of the footer */
  97.     margin-left:auto;
  98.     margin-right:auto;
  99.     border-top: thin #333333 solid;
  100.     border-bottom: thin #333333 solid;
  101. }
Nov 15 '07 #1
0 1914

Sign in to post your reply or Sign up for a free account.

Similar topics

5
14395
by: Tyler Carver | last post by:
I've tried to get CSS to give me a basic layout where I can place a footer at the bottom of the page and the top of the page I can use for content. I don't however want the footer to pull away from the bottom of the viewport if the top content is small. Also, when I resize the window I want the footer to move with the bottom of the page until I reach the content. Here is an example that works both in IE and Mozilla using tables. I...
3
5045
by: SebiF | last post by:
Hello, It might have been asked before but since I could not find a reference here's my qustion: I want a liquid layout similar to this one: http://www.alistapart.com/d/negativemargins/ex5.htm but with the footer fixed at the bottom and the content in a scrollable area.
0
2162
by: Markus Olderdissen | last post by:
i want to create my page with 100% height. <table height="100%"works but is not correct by default. i saw various information how to do it with stylesheet. i really have problems to create my page. i want to have header on top and footer on bottom. content should be on top of the middle part. i always got scrollbars, even if my page isn't too large. perhaps, someone can show me to do it right. the following code describes my wish. ...
3
7333
by: Q. John Chen | last post by:
I have a page contains a table (e.g a 3-row table). The middle row is for the content and the bottom row is for footer notes. When the middle row does not have much info, the footer goes way too high up. How can I automatically adjust the height of the middle row when a user re-size the browser window. Or, how can specify a minimum height so at least the footer is a footer?
1
6488
by: Mike Collins | last post by:
I am trying to create some pages and have them take 100% of the window, but I cannot get 100% to work. If I set the height of my div, the page displays a scroll bar and it looks like I set the height to about 150%. I tried using CSS, now I am trying tables. Can someone show me where I am mixing things up? Thanks. --Master Sheet <%@ Master Language="C#" AutoEventWireup="true" CodeFile="master.master.cs" Inherits="pts" %>
2
3192
by: darkzone | last post by:
Looked almost ok in my editor but not so good in fire fox. I was going for a layout that was elastic some what. A header with one image repeating 100%, an there image slightly to the left also in the header, a container a 20% wide box for a list, two 80% wide boxes for content, a footer with the same image set up to end it. It was looking almost there for white but the footer image could now be viewed. ?= <!DOCTYPE HTML PUBLIC...
1
3600
by: soms2m | last post by:
HELLO ALL, I want to fill the parent window height with respect to the sub window height which is loading using ajax (mootools). For example if the parent window height is normal and the loading child window height is 1200px (saying), when the child window load the height of the parent window changs but the backgorund color which is given 100% not fill the parent window. I have given my example codes, please give a solution as soon as...
0
2197
by: peter.c.bradley | last post by:
Hi folks, I have an Access report that has an unbound text box in the details section. The report also includes the standard headers and footers. The details section is populated by a query executed during the “Report_Open” event. Depending on the query, the details section can have 1 or more records and each record is a text string of variable length (the text box is set to grow). I’m trying to create the effect of a constant size...
1
1578
by: adamjblakey | last post by:
Hi, Right i have just built a site which has 3 divs align to the left and in the outer 2 divs i have a background which i want to be a 100% so when the middle stretches so do the outer 2 but it does not happen. Please can you have a look at my code: HTML <!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"> <head>...
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10315
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.