Firefox css div tags issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • paulroskilly@hotmail.com

    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

  • Spartanicus

    #2
    Re: Firefox css div tags issue

    paulroskilly@ho tmail.com wrote:
    [color=blue]
    ><div style="overflow :scroll; overflow-x:hidden; height=315px">[/color]

    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

    Comment

    • Martin Bialasinski

      #3
      Re: Firefox css div tags issue

      paulroskilly@ho tmail.com wrote:
      [color=blue]
      > <div style="overflow :scroll; overflow-x:hidden; height=315px">[/color]

      For starters, you could write valid css.

      height:315px
      [color=blue]
      > wouldn't it be nice if all browsers rendered html and css in exactly
      > the same way![/color]

      Oh yes. Unfortunately, there is Internet Explorer.

      Comment

      • Steve Pugh

        #4
        Re: Firefox css div tags issue

        Spartanicus <me@privacy.net > wrote:
        [color=blue]
        >paulroskilly@h otmail.com wrote:
        >[color=green]
        >><div style="overflow :scroll; overflow-x:hidden; height=315px">[/color]
        >
        >scroll is the default value for the overflow property, no point in
        >specifying it.[/color]

        Visible is the default. See


        Steve

        Comment

        • paulroskilly@hotmail.com

          #5
          Re: Firefox css div tags issue

          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.

          Comment

          • paulroskilly@hotmail.com

            #6
            Re: Firefox css div tags issue

            Thanks Martin, I feel stupid, its always the smallest things.

            Comment

            • Steve Pugh

              #7
              Re: Firefox css div tags issue

              paulroskilly@ho tmail.com wrote:
              [color=blue]
              >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![/color]

              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

              Comment

              Working...