473,808 Members | 2,869 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

page height

pradeepjain
563 Contributor
Hello guys,
I am working on a site where in i have a container of width 90% within which all header footer and content area comes.I have a small problem with footer that is when i have content more the footer goes down which is ok.but when i have very small content say 5 lines the footer comes up this is the main problem.when the content is less then a page height i want the footer to be at the bottom of the page..is there any way to do this .say some min-height or something like that.


Thanks,
Pradeep
Sep 1 '08 #1
10 4279
Dormilich
8,658 Recognized Expert Moderator Expert
is there any way to do this .say some min-height or something like that.
there's the min-height css property (though IE < 7 fails there). values may be of length or percentage.
Sep 1 '08 #2
pradeepjain
563 Contributor
there's the min-height css property (though IE < 7 fails there). values may be of length or percentage.

i am not able to set in percentages ..i want to set in % bcos to support all browsers..how to do it
Sep 1 '08 #3
Dormilich
8,658 Recognized Expert Moderator Expert
% - Defines the minimum height for the element in % of the containing block
for min-height to work with % you need a container element (e.g. body) from which the min-height is calculated (but obviously you need a numeric value to set the containers height itself). So you can't stretch a %-defined element over the parent element's border (you also can't stretch the parent itself, resp.)

note: same goes for height
Sep 1 '08 #4
pradeepjain
563 Contributor
for min-height to work with % you need a container element (e.g. body) from which the min-height is calculated (but obviously you need a numeric value to set the containers height itself). So you can't stretch a %-defined element over the parent element's border (you also can't stretch the parent itself, resp.)

note: same goes for height
i have 2 elements body and container which is inside body where all data comes......
Sep 1 '08 #5
Dormilich
8,658 Recognized Expert Moderator Expert
i have 2 elements body and container which is inside body where all data comes......
your problem (as I understand) was that you want the footer at the bottom of the page even when there's hardly any content. To accomplish that you have to stretch the body all the way down, but the body only wraps around the existing text/content (if no numeric height is set). Unfortunately you can't do that with percentage height (because then you need a wrapper element of defined (numeric) height).
The only solution for this I know is to determine the inner height of the browser window and assign that value to body/the container. You also may use absolute positioning (you must take care when to switch back to normal, otherwise the footer will sit over your content).

to show where body and the container end, temporarly assign a border to both and experiment with numeric/percentage (min-)heights

hope that is of more help
Sep 1 '08 #6
David Laakso
397 Recognized Expert Contributor
Have you tried "footerStickAlt " ?
footerStickAlt
Sep 1 '08 #7
pradeepjain
563 Contributor
Guys i am not really able to achieve what i need..the layout that i am using is

http://www.cssplay.co.uk/layouts/3cols.html


so if u can show me what i need to add in css and where i will be great full.bcos once i see some example i wll be able to understand better.
Sep 2 '08 #8
Dormilich
8,658 Recognized Expert Moderator Expert
I'd say, just add the rules according to the given example.
or applied to the example of your link:
- copy the css rules
- rename #nonFooter to #container
- rename #content to #inner
- put everything between the closing #container div tag and the closing body tag in one div and rename #footer it to it
- adjust padding and margin to your needs

regards
Sep 2 '08 #9
pradeepjain
563 Contributor
hey guys i used this

http://bonrouge.com/hcf-fluid.php
for my problem..its working but some small problems plzz help me out.

I am posting my css and html code'
this is css

Expand|Select|Wrap|Line Numbers
  1. html {height:100%;}
  2. body {
  3. margin:0;
  4. padding:0;
  5. height:100%;
  6. background-color:orange;
  7. }
  8. #wrap {
  9. width:90%;
  10. margin-left:auto;
  11. margin-right:auto;
  12. min-height:100%;
  13. position:relative;
  14. border:1px solid silver;
  15. padding-left:1px;
  16. padding-right:1px;
  17. }
  18. * html #wrap {height:100%}
  19. #inner-wrap {
  20. background-color: blue;
  21. padding-bottom:80px;
  22. }
  23. #inner-wrap:after {
  24. content:" ";
  25. display:block;
  26. clear:both;
  27. }
  28. * html #inner-wrap {
  29. height:1px;
  30. }
  31. #footer {
  32. position:absolute;
  33. bottom:0;
  34. height:80px;
  35. background-color: #333333;
  36. width:100%;
  37. padding:-10px;
  38. }
  39. #header {
  40. height:80px;
  41. background-color: #333333;
  42. }
  43.  
  44.  

this is html

[HTML]<html>
<head>
<link rel="stylesheet " type="text/css" href="style1.cs s" />
<body>
<div id="wrap">
<div id="header">Hea der</div>
<div id="inner-wrap">
<div id="content">Co ntent</div>
</div>
<div id="footer">Foo ter</div> </div>
</body>
</html>[/HTML]


wht the problem is that the blank portion where no content is there i.e the gap b/w the content and footer is taking the color of the body..how to make it not take the color.and yeah in the bottom of the page in the footer its not showing the right side border as its stretching full width .plzz have a look at code and tell wht changes shld be made.

and ya i did not understand the need for padding-bottom:80px in #inner-wrap should the padding set as the height of the footer and also the need for #inner-wrap:after



thanks,
Pradeep
Sep 2 '08 #10

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

Similar topics

2
2322
by: Goober | last post by:
I have the following default.aspx page that works properly. However, what I want to do is to link the graphics within it (that are hard coded now in the default web page) to our corporate website, which has the same graphics rotated on a 30 day basis or so. They have a standard naming convention where I know the 3 graphics are always going to be fa_mmyy.jpg, am_mmyy.jpg, and ax_mmyy.jpg. The HTML follows:
2
4441
by: VB Programmer | last post by:
I only have 1 set of <FORM> tags in my HTML file, but I keep getting this error. Any ideas? *********** A page can have only one server-side Form tag. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: A page can have only one
6
4906
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
7
2409
by: GaryDean | last post by:
In my old 1.1 apps the default was MS_POSITIONING="GridLayout" and Textboxes and labels and such always had POSITION: absolute; and I never had any distortion when the page was rendered. Life was good. now in 2.0 I'm using the default placeholder and putting a table in the placeholder and putting controls in the cells in the table. "the way it is supposed to be done" I have a textbox in a table that is defined as follows... <td...
13
14947
by: Greg | last post by:
Most suggestions on this topic recommend to use a page footer and make it visible only on the last page. My problem is that the footer is half of the height of a page which means the detail would show on only the top half of each page with whitepace at the bottom of each page. How can I get the detail to fill each page with my "half page height" report footer at the bottom of the last page? Any suggestions to solve this would be...
1
3153
by: rsteph | last post by:
I've got some product information pages, with images and text, all setup within a table. I'm trying to add a small image in the upper right hand corner of the content div (where all the important information is). I've got the product name at the top, left aligned and typically as a two lined header, and I'd like to add a small logo to the right of that, either right beside it, or in the far right corner. could anyone help me with how to set...
4
2148
osward
by: osward | last post by:
I had made a table colum sortable and paging the table, following are the code // Display Event List echo "<center>"._EVENTLIST."</center><br>"; $now = Date(Y-m-d); // sort table colum if(!isset($_GET)){ $page = 1; } else {
1
2178
by: soluvah | last post by:
Hello Folks, Been trying to widen my site's body from "779" to "1000" so it almost fills the window. IE 7 on windows XP just dismantles the pages and leaves wide gaps between the left column and the body with no change in size to the body width. FF is doing it right. Please let me know if this problem can be fixed, I am at my wit's end. I will also send more code if needs be. I have lots of other code but I will copy and paste the one I...
7
3620
by: imtmub | last post by:
I have a page, Head tag Contains many Scripts and style sheet for Menu and Page. This code working fine and displaying menus and page as i wanted. Check this page for reference. http://www.marco.com.cn/web-content/marco_re10.html -------------------------------------------------------------- <head> <!-- InstanceBeginEditable name="doctitle" --> <title>Marco</title> <!-- InstanceEndEditable -->
3
4439
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine when iam using a normal web page... but can't in content page.... Code in Master Page <%@ Master Language="C#" AutoEventWireup="true" CodeFile="submaster.master.cs" Inherits="submaster" %> <%@ Register Assembly="AjaxControlToolkit"...
0
9721
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
10631
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...
1
10374
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
9196
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
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
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
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.