Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

[XHTML+XML] html and body size
 

bipède




quote this post edit post

IP Loged report this post

Old Post  12-10-05 - 11:23 AM  
Hi,

Is it possible in Mozilla / Firefox / Netscape to fix minimum size for
html and/or body element in a "real" XHTML (mime application/xhtml+xml)
page so that when there is few text in a page the background color fill
the window and when content exeed the window size the body resize to
include all the content.

For now I can't figure out how to do this, if I use height:100%;
width:100% the size of html and body is *always* 100% even if there is
exeeding content and the background color just stop at 100% of the
window size. In fact the html and body width seems to be always 100%: a
big image exeed the background even if I set width:auto, it's really
disconcerting.

min-width and min-height doesn't seems to be taken into account.

thanks in advance
any solution would be welcome


Post Follow-Up to this message ]
Re: [XHTML+XML] html and body size
 

Gus Richter




quote this post edit post

IP Loged report this post

Old Post  12-12-05 - 08:40 AM  
bipède wrote:
> Hi,
>
> Is it possible in Mozilla / Firefox / Netscape to fix minimum size for
> html and/or body element in a "real" XHTML (mime application/xhtml+xml)
> page so that when there is few text in a page the background color fill
> the window and when content exeed the window size the body resize to
> include all the content.
>
> For now I can't figure out how to do this, if I use height:100%;
> width:100% the size of html and body is *always* 100% even if there is
> exeeding content and the background color just stop at 100% of the
> window size. In fact the html and body width seems to be always 100%: a
> big image exeed the background even if I set width:auto, it's really
> disconcerting.
>
> min-width and min-height doesn't seems to be taken into account.
>
> thanks in advance
> any solution would be welcome

Have you tried placing everything inside a wrapper div and repeating the
background request in it as well?

--
Gus


Post Follow-Up to this message ]
Re: [XHTML+XML] html and body size
 

Pawel Knapik




quote this post edit post

IP Loged report this post

Old Post  12-13-05 - 03:33 AM  
bipède napisał(a):
> Hi,
>
> Is it possible in Mozilla / Firefox / Netscape to fix minimum size for
> html and/or body element in a "real" XHTML (mime application/xhtml+xml)
> page so that when there is few text in a page the background color fill
> the window and when content exeed the window size the body resize to
> include all the content.
>
> For now I can't figure out how to do this, if I use height:100%;
> width:100% the size of html and body is *always* 100% even if there is
> exeeding content and the background color just stop at 100% of the
> window size. In fact the html and body width seems to be always 100%: a
> big image exeed the background even if I set width:auto, it's really
> disconcerting.
>
> min-width and min-height doesn't seems to be taken into account.

if you use
html, body { height:100%; min-height:100%; }
you will get 100% because you defined it. the above means
"exactly 100% and no less than 100%".

try
html, body { height:auto; min-height:100%; }
and should work.

if you want to support IE (by content negotiation) you can
use a simple "hack":
html, body { height:auto !important; height:100%;
min-height:100%; }


Post Follow-Up to this message ]
Re: [XHTML+XML] html and body size
 

bipède




quote this post edit post

IP Loged report this post

Old Post  12-16-05 - 11:23 AM  
bipède wrote:
> Hi,
>
> Is it possible in Mozilla / Firefox / Netscape to fix minimum size for
> html and/or body element in a "real" XHTML (mime application/xhtml+xml)
> page so that when there is few text in a page the background color fill
> the window and when content exeed the window size the body resize to
> include all the content.
>
> For now I can't figure out how to do this, if I use height:100%;
> width:100% the size of html and body is *always* 100% even if there is
> exeeding content and the background color just stop at 100% of the
> window size. In fact the html and body width seems to be always 100%: a
> big image exeed the background even if I set width:auto, it's really
> disconcerting.
>
> min-width and min-height doesn't seems to be taken into account.
>
> thanks in advance
> any solution would be welcome


Thanks for all your answers,

I have found the work arround, in fact in real XHTML with netscape /
mozilla / firefox if you want to have a background color or a repeated
background image that always fill the window you should set it for
'html' tag and not 'body' tag. Here's the solution I use :

html {
padding:0;
margin:0;
background:#f4f4f4 url('/images/fond-colonne.png') repeat-y left;
}

It was simple but it seems that no one have found it until now (nothing
on internet about it). Other solutions I tried dont work.


Post Follow-Up to this message ]
Re: [XHTML+XML] html and body size
 

Steve Pugh




quote this post edit post

IP Loged report this post

Old Post  12-16-05 - 11:23 AM  
bip=E8de wrote:

> I have found the work arround, in fact in real XHTML with netscape /
> mozilla / firefox if you want to have a background color or a repeated
> background image that always fill the window you should set it for
> 'html' tag and not 'body' tag.
>
> It was simple but it seems that no one have found it until now (nothing
> on internet about it).

Hardly, it's documented in the CSS specification.

"The background of the root element becomes the background of the
canvas and covers the entire canvas, anchored at the same point as it
would be if it was painted only for the root element itself. The root
element does not paint this background again.

For HTML documents, however, we recommend that authors specify the
background for the BODY element rather than the HTML element. For HTML
documents whose root HTML element has computed values of 'transparent'
for 'background-color' and 'none' for 'background-image', user agents
must instead use the computed value of those properties from that HTML
element's first BODY element child when painting backgrounds for the
canvas, and must not paint a background for that BODY element. This
does not apply to XHTML documents."
- http://www.w3.org/TR/CSS21/colors.html#q2

I think the replies to your post focussed on the height: 100% issue
rather than the background issue because that seemed to be what you
were asking about.

Steve



Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 06:17 AM. Post New Thread   
  Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top