472,103 Members | 2,209 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,103 software developers and data experts.

Firefox css div tags issue

Hello,

Can anyone help with this, I have a div tag :

<div style="overflow:scroll; overflow-x:hidden; height=315px">
In IE this renders the DIV fine, it is 315 pixels high and has a
vertical scroll bar but no horizontal scroll bar, if firefox though it
ignores the height and makes the div just big enough to show its
contents and it also shows the horizontal scroll bar when it is
supposed to be hidden, wouldn't it be nice if all browsers rendered
html and css in exactly the same way!

Thanks,

Paul

Jul 21 '05 #1
6 27341
pa**********@hotmail.com wrote:
<div style="overflow:scroll; overflow-x:hidden; height=315px">


scroll is the default value for the overflow property, no point in
specifying it. In CSS 2.1 there is no such property as overflow-x.

--
Spartanicus
Jul 21 '05 #2
pa**********@hotmail.com wrote:
<div style="overflow:scroll; overflow-x:hidden; height=315px">
For starters, you could write valid css.

height:315px
wouldn't it be nice if all browsers rendered html and css in exactly
the same way!


Oh yes. Unfortunately, there is Internet Explorer.
Jul 21 '05 #3
Spartanicus <me@privacy.net> wrote:
pa**********@hotmail.com wrote:
<div style="overflow:scroll; overflow-x:hidden; height=315px">


scroll is the default value for the overflow property, no point in
specifying it.


Visible is the default. See
http://www.w3.org/TR/CSS21/visufx.html#propdef-overflow

Steve

Jul 21 '05 #4
If I remove style="overflow:scroll; then is has no scroll bars and it
streches to show the whole content, over 315 pixels high.

If overflow-x:hidden; is IE specific then fair enough, but the main
problem is that firefox is ignoring the height.

Jul 21 '05 #5
Thanks Martin, I feel stupid, its always the smallest things.

Jul 21 '05 #6
pa**********@hotmail.com wrote:
Can anyone help with this, I have a div tag :

<div style="overflow:scroll; overflow-x:hidden; height=315px">

In IE this renders the DIV fine, it is 315 pixels high and has a
vertical scroll bar but no horizontal scroll bar, if firefox though it
ignores the height and makes the div just big enough to show its
contents and it also shows the horizontal scroll bar when it is
supposed to be hidden, wouldn't it be nice if all browsers rendered
html and css in exactly the same way!


FF is applying your CSS correctly.

overflow-x is a Microsoft invention and isn't part of the CSS 2.x
specification. It is part of the CSS3 proposal and will be supported
in future versions of Firefox (support added in Mozilla 1.8a4).

height=315px is just a syntax error.

So after discarding the above what Firefox sees is just <div
style="overflow:scroll;"> and it implements that perfectly by drawing
scrollbars.

Steve

Jul 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Nils Weisensee | last post: by
6 posts views Thread by michaelzap | last post: by
2 posts views Thread by David Housman | last post: by
3 posts views Thread by Jake G | last post: by
reply views Thread by leo001 | last post: by

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.