Jump to content

Overflow not working correctly in Mozilla and Netscape


myownslave
 Share

Recommended Posts

It seems that the only way I can get scrollbars in Netscape or in Mozilla is to set overflow:auto; in the BODY. But I don't want a scrollbar in the body, I want it in the specific style sheets instead. Setting overflow:hidden; in BODY and overflow;auto; in those specific style sheets solves the problem in IE, but in Netscape and Mozilla, that just results in no scrollbars appearing whatsoever!The root cause of the problem might be that Mozilla and Netscape don't seem to pay any attention to the height I've set the style sheets to - they just automatically set the style sheet to fit it's content, and hence don't see the need for a scrollbar. Here's a sample of my code: BODY { margin:15px 0px; border:0; padding:0px; width:100%; height:100%; max-height:100%; background:#000099; text-align:center; font-family:arial, verdana, sans-serif; font-size:0.8em; overflow:hidden; } #CONTENT { top:0px; margin:0px auto; width:764px; height:40%; padding:15px; background:#FFFFFF; text-align:left; text-indent:40px; overflow:auto; } Even though the height is set to 40%, Mozilla and Netscape ignore this and just set the height to fit the content. At the very start of the code, I have the following:<?XML version="1.0" encoding="UTF-8"?><!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/XHTML11/DTD/XHTML11.dtd"><HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><HEAD><META http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/><TITLE>THE FENIANS GAA CLUB - News</TITLE><META name="Author" content="Jim Broderick"/>Do I need anything else to make it fully-compatible with Netscape/Mozilla?Cheers,Jim

Link to comment
Share on other sites

I have got a web page with scroll-bars only in the "content" div, and it works perfect on firefox...look: examplethe code is that:

#queoferimimatges {	text-align: justify;	width: 313px;	height: 625px;	float: right;	clear: right;	margin-bottom: 0px;	position: relative;	overflow: auto;}

and the scrollbar is only in the <div id="queoferimimatges"> where are placed the images ... on body i have no overflow set.. :)

Link to comment
Share on other sites

I have got a web page with scroll-bars only in the "content" div, and it works perfect on firefox...look: examplethe code is that:
#queoferimimatges {	text-align: justify;	width: 313px;	height: 625px;	float: right;	clear: right;	margin-bottom: 0px;	position: relative;	overflow: auto;}

and the scrollbar is only in the <div id="queoferimimatges"> where are placed the images ... on body i have no overflow set.. :)

Cheers, I'll take a look at your code and see what I can do. Just a question - what do float:right; and clear:right; do? By any chance do they just position the div in a certain way in it's container div? Cos if so, then this might help me with another problem I'm having...
Link to comment
Share on other sites

Cheers, I'll take a look at your code and see what I can do. Just a question - what do float:right; and clear:right; do? By any chance do they just position the div in a certain way in it's container div? Cos if so, then this might help me with another problem I'm having...
Yes. float: left; positions the object to the up left of it's container and float:right;... yes... up right to it. The next object is placed next to the floating one, unless there's a "clear" on that following object. If there is, the object is positioned below the floating one.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...