By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,676 Members | 1,759 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,676 IT Pros & Developers. It's quick & easy.

CSS POSITIONING FOR WHOLE LAYOUT OF THE PAGE

P: n/a
I am facing a trival problem with my web page.

I have two kind of web pages :

1. few pages has lesser content
2. few pages expands largely and they cover more area.

Now, I want to accomplish this objective. The page height should grow
for the pages with more content. But, the pages having less content
should have a pre-specified page height.

I tried many ways to position them using css, like I used % to specify
height. Few ways are working with mozilla/firefox but, few are working
improperly with IE6/7

I hope there are some standard methods available for these kind of
problem. I will be thankful to the readers who can help me to solve
this puzzle.

Thanks in advance,
regards,
-Ambastha

Feb 4 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
On 2007-02-04, gr**********@gmail.com wrote:
I am facing a trival problem with my web page.

I have two kind of web pages :

1. few pages has lesser content
2. few pages expands largely and they cover more area.

Now, I want to accomplish this objective. The page height should grow
for the pages with more content. But, the pages having less content
should have a pre-specified page height.
Why would you do that? Even if the page contains very little
material, you don't know the size of my browser window or the size
of my fonts. If you fix the height, I may not be able to read even
the small amount of material on the page.
I tried many ways to position them using css, like I used % to specify
height. Few ways are working with mozilla/firefox but, few are working
improperly with IE6/7

I hope there are some standard methods available for these kind of
problem. I will be thankful to the readers who can help me to solve
this puzzle.

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Feb 4 '07 #2

P: n/a
Gazing into my crystal ball I observed "Chris F.A. Johnson"
<cf********@gmail.comwriting in news:h0gh94-s7s.ln1
@xword.teksavvy.com:
>Now, I want to accomplish this objective. The page height should grow
for the pages with more content. But, the pages having less content
should have a pre-specified page height.

Why would you do that? Even if the page contains very little
material, you don't know the size of my browser window or the size
of my fonts. If you fix the height, I may not be able to read even
the small amount of material on the page.

I understand what the OP wants. For exmaple, say you have a page with a
header, left hand navigation, content and a footer. Longer pages have
the footer at the bottom of the window, or below the fold. Short pages
might have the footer right up next to the content. It might look a
little strange.

To the OP: try putting margin-top of your footer.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Feb 4 '07 #3

P: n/a
On 2007-02-04, Adrienne Boswell <ar****@yahoo.comwrote:
Gazing into my crystal ball I observed "Chris F.A. Johnson"
<cf********@gmail.comwriting in news:h0gh94-s7s.ln1
@xword.teksavvy.com:
>>Now, I want to accomplish this objective. The page height should grow
for the pages with more content. But, the pages having less content
should have a pre-specified page height.

Why would you do that? Even if the page contains very little
material, you don't know the size of my browser window or the size
of my fonts. If you fix the height, I may not be able to read even
the small amount of material on the page.


I understand what the OP wants. For exmaple, say you have a page with a
header, left hand navigation, content and a footer. Longer pages have
the footer at the bottom of the window, or below the fold. Short pages
might have the footer right up next to the content. It might look a
little strange.
I also thought this was what the OP wanted.
To the OP: try putting margin-top of your footer.
Isn't it min-height that's needed (to set a minimum height)?

Probably doesn't work in IE.
Feb 4 '07 #4

P: n/a
Rik
Ben C <sp******@spam.eggswrote:
>I understand what the OP wants. For exmaple, say you have a page with a
header, left hand navigation, content and a footer. Longer pages have
the footer at the bottom of the window, or below the fold. Short pages
might have the footer right up next to the content. It might look a
little strange.

I also thought this was what the OP wanted.
>To the OP: try putting margin-top of your footer.

Isn't it min-height that's needed (to set a minimum height)?

Probably doesn't work in IE.
Then again, height behaves like min-height in MSIE. So setting min-height,
and a height in an MSIE-only conditional would solve it.

--
Rik Wasmus
Feb 4 '07 #5

P: n/a
On 4 Feb, 19:37, Rik <luiheidsgoe...@hotmail.comwrote:
Ben C <spams...@spam.eggswrote:
I understand what the OP wants. For exmaple, say you have a page with a
header, left hand navigation, content and a footer. Longer pages have
the footer at the bottom of the window, or below the fold. Short pages
might have the footer right up next to the content. It might look a
little strange.
I also thought this was what the OP wanted.
To the OP: try putting margin-top of your footer.
Isn't it min-height that's needed (to set a minimum height)?
Probably doesn't work in IE.

Then again, height behaves like min-height in MSIE. So setting min-height,
and a height in an MSIE-only conditional would solve it.
Height doesn't behave as min-height in MSIE. For non-replaced block-
level elements, height could be described to behave as a minimum
height, but not 'min-height'. In this case MSIE behave as any other
browser.

http://www.w3.org/TR/REC-CSS2/visude...propdef-height

The properties min-height and max-height is used to specify a height
range. If you set 'height' explicit, you will override any range. You
can't say that a height should be both within a certain range, and
have an exact value.

http://www.w3.org/TR/REC-CSS2/visude...in-max-heights

In this case, just height might do it.

Feb 9 '07 #6

P: n/a
On 4 Feb, 16:29, group.rit...@gmail.com wrote:
I am facing a trival problem with my web page.

I have two kind of web pages :

1. few pages has lesser content
2. few pages expands largely and they cover more area.

Now, I want to accomplish this objective. The page height should grow
for the pages with more content. But, the pages having less content
should have a pre-specified page height.

I tried many ways to position them using css, like I used % to specify
height. Few ways are working with mozilla/firefox but, few are working
improperly with IE6/7
Have you tried

html, body { height: 100% }
..content { height: n% }

If/if not, can you post some code? I would like to see what's working,
and what's not.

Feb 9 '07 #7

P: n/a
On Feb 9, 5:32 am, "Roy A." <royarnes...@gmail.comwrote:
On 4 Feb, 16:29, group.rit...@gmail.com wrote:
I am facing a trival problem with my web page.
I have two kind of web pages :
1. few pages has lesser content
2. few pages expands largely and they cover more area.
Now, I want to accomplish this objective. The page height should grow
for the pages with more content. But, the pages having less content
should have a pre-specified page height.
I tried many ways to position them using css, like I used % to specify
height. Few ways are working with mozilla/firefox but, few are working
improperly with IE6/7

Have you tried

html, body { height: 100% }
.content { height: n% }

If/if not, can you post some code? I would like to see what's working,
and what's not.
Thanks to all of you for the suggestions.
i tried everything..
i used %, px, em and all..
also i tried with min-height concept..
But, everything is running fine with firefox. But,
the problem is with IE6,7 both :(
Right now, i have done some temporary arrangements.
But, am not satisfied with the behavior of IE.

Feb 14 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.