Non scrolling block, like frames but without frames

Discussion in 'HTML' started by Brian Cryer, Feb 15, 2007.

  1. Brian Cryer

    Brian Cryer Guest

    Does anyone know whether its possible (perhaps using css) to have an area on
    a page (say a menu bar at the top of the page) to be fixed so that it is
    always visible regardless of how the page is scrolled - much as you would
    get if you used frames but without using frames.

    I'm thinking of a site redesign and one idea I've had would use a fixed
    non-scrolling portion of the browser window, but I'm just not sure whether
    its possible without resorting to frames.

    TIA.
    --
    Brian Cryer
    www.cryer.co.uk/brian
    Brian Cryer, Feb 15, 2007
    #1
    1. Advertising

  2. Brian Cryer

    J.O. Aho Guest

    Brian Cryer wrote:
    > Does anyone know whether its possible (perhaps using css) to have an area on
    > a page (say a menu bar at the top of the page) to be fixed so that it is
    > always visible regardless of how the page is scrolled - much as you would
    > get if you used frames but without using frames.


    Yes, use the position option absolute for the dive where you have the menu bar.

    --

    //Aho
    J.O. Aho, Feb 15, 2007
    #2
    1. Advertising

  3. "Brian Cryer" wrote

    > Does anyone know whether its possible (perhaps using css) to have an area
    > on a page (say a menu bar at the top of the page) to be fixed so that it
    > is always visible regardless of how the page is scrolled - much as you
    > would get if you used frames but without using frames.


    position: fixed

    Doesn't work with IE.

    > I'm thinking of a site redesign and one idea I've had would use a fixed
    > non-scrolling portion of the browser window,


    Why? You just use up valuable real estate where you could be displaying
    content. Most of us are used to [whatever it is you want to put there]
    scrolling with the page.

    > resorting to frames.


    Don't.
    Richard Formby, Feb 15, 2007
    #3
  4. Brian Cryer

    Brian Cryer Guest

    "J.O. Aho" <> wrote in message
    news:...
    > Brian Cryer wrote:
    >> Does anyone know whether its possible (perhaps using css) to have an area
    >> on a page (say a menu bar at the top of the page) to be fixed so that it
    >> is always visible regardless of how the page is scrolled - much as you
    >> would get if you used frames but without using frames.

    >
    > Yes, use the position option absolute for the dive where you have the menu
    > bar.


    Unless I'm doing something wrong, even with absolute positioning if the
    browser scrolls then the item I've positioned stills scrolls with it. I'd
    like something that stays put, regardless of browser scrolling - a bit like
    you can do with the background-image on a page.
    --
    Brian Cryer
    www.cryer.co.uk/brian
    Brian Cryer, Feb 15, 2007
    #4
  5. Brian Cryer wrote:

    > "J.O. Aho" <> wrote in message
    > news:...
    >> Brian Cryer wrote:
    >>> Does anyone know whether its possible (perhaps using css) to have an
    >>> area on a page (say a menu bar at the top of the page) to be fixed so
    >>> that it is always visible regardless of how the page is scrolled - much
    >>> as you would get if you used frames but without using frames.

    >>
    >> Yes, use the position option absolute for the dive where you have the
    >> menu bar.

    >
    > Unless I'm doing something wrong,


    http://www.w3.org/TR/CSS21/visuren.html#propdef-position
    Richard Formby, Feb 15, 2007
    #5
  6. Brian Cryer

    Brian Cryer Guest

    "Richard Formby" <> wrote in message
    news:6iXAh.1476$...
    > "Brian Cryer" wrote
    >
    >> Does anyone know whether its possible (perhaps using css) to have an area
    >> on a page (say a menu bar at the top of the page) to be fixed so that it
    >> is always visible regardless of how the page is scrolled - much as you
    >> would get if you used frames but without using frames.

    >
    > position: fixed
    >
    > Doesn't work with IE.


    Now that you've shown me what I should be looking for, there is a work
    around for IE - http://www.cssplay.co.uk/layouts/fixed.html.

    >> I'm thinking of a site redesign and one idea I've had would use a fixed
    >> non-scrolling portion of the browser window,

    >
    > Why? You just use up valuable real estate where you could be displaying
    > content. Most of us are used to [whatever it is you want to put there]
    > scrolling with the page.


    You are probably right. I was interested in whether it could be done, but I
    accept the arguments against doing it - so I probably won't.

    Thanks.
    --
    Brian Cryer
    www.cryer.co.uk/brian
    Brian Cryer, Feb 15, 2007
    #6
  7. Scripsit Richard Formby:

    > position: fixed
    >
    > Doesn't work with IE.


    Works now, in IE 7 in "standards" mode.

    Older versions are still rather common, so I would use position: fixed only
    when the page degrades gracefully when position: fixed is ignored. There's
    no simple workaround really, since old versions of IE are foolish enough to
    _recognize_ the value fixed but _implement_ it as if it were static, so you
    can't just use { position: absolute; position: fixed; ... } - you would get
    a "static" (i.e., non-positioned) element on old versions of IE.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Feb 15, 2007
    #7
  8. Brian Cryer

    Ed Seedhouse Guest

    On Thu, 15 Feb 2007 12:05:17 +0100, "J.O. Aho" <> wrote:

    >Brian Cryer wrote:
    >> Does anyone know whether its possible (perhaps using css) to have an area on
    >> a page (say a menu bar at the top of the page) to be fixed so that it is
    >> always visible regardless of how the page is scrolled - much as you would
    >> get if you used frames but without using frames.

    >
    >Yes, use the position option absolute for the dive where you have the menu bar.


    No, that won't do it. What he wants is position "fixed", but
    unfortunately IE6 and below don't support that.
    Ed Seedhouse, Feb 15, 2007
    #8
  9. Brian Cryer

    dorayme Guest

    In article <>,
    "Brian Cryer" <brian.cryer@127.0.0.1.ntlworld.com> wrote:

    > > Why? You just use up valuable real estate where you could be displaying
    > > content. Most of us are used to [whatever it is you want to put there]
    > > scrolling with the page.

    >
    > You are probably right. I was interested in whether it could be done, but I
    > accept the arguments against doing it - so I probably won't.


    Before accepting this too quickly in respect to fixed
    positioning, perhaps consider that it is not a good _general_
    argument. It certainly applies to some things. You gave just an
    example in your op, there are other examples, like a left
    navigation bar, a neat vertically economical top horizontal
    navigation strip that _could_ be very handy to have visible at
    all times.

    The difficulties of cross popular browser implementation -
    without using frames (which have other unrelated problems) - are
    a good reason to consider it is not worth using fixed. So too is
    something not mentioned so far. Some people report a jerkiness in
    the scrolling as a side effect. This also is a good argument
    against.

    --
    dorayme
    dorayme, Feb 15, 2007
    #9
  10. Brian Cryer

    Brian Cryer Guest

    "dorayme" <> wrote in message
    news:...
    > In article <>,
    > "Brian Cryer" <brian.cryer@127.0.0.1.ntlworld.com> wrote:
    >
    >> > Why? You just use up valuable real estate where you could be displaying
    >> > content. Most of us are used to [whatever it is you want to put there]
    >> > scrolling with the page.

    >>
    >> You are probably right. I was interested in whether it could be done, but
    >> I
    >> accept the arguments against doing it - so I probably won't.

    >
    > Before accepting this too quickly in respect to fixed
    > positioning, perhaps consider that it is not a good _general_
    > argument. It certainly applies to some things. You gave just an
    > example in your op, there are other examples, like a left
    > navigation bar, a neat vertically economical top horizontal
    > navigation strip that _could_ be very handy to have visible at
    > all times.


    Yes, agreed. Good point. I was thinking about this last night and a left
    navigation bar struck me as something *potentially* useful to have a fixed
    location. I hadn't thought about a small horizontal navigation strip. Good
    suggestion. When I have time I'll play with some ideas and see what works
    and what doesn't.

    > The difficulties of cross popular browser implementation -
    > without using frames (which have other unrelated problems) - are
    > a good reason to consider it is not worth using fixed. So too is
    > something not mentioned so far. Some people report a jerkiness in
    > the scrolling as a side effect. This also is a good argument
    > against.


    I'd always assumed that the "jerkiness" was because the implementation
    relied on JavaScript - at least on the sites I've seen (but then I never
    actually looked to see how it was implemented).. If I ever do decide to go
    down this route I'll try a prototype out on a number of browsers. Certainly
    if its "jerky" then that's a good reason for not doing it.

    Thanks.
    --
    Brian Cryer
    www.cryer.co.uk/brian
    Brian Cryer, Feb 16, 2007
    #10
  11. Brian Cryer

    dorayme Guest

    In article <>,
    "Brian Cryer" <brian.cryer@127.0.0.1.ntlworld.com> wrote:

    > "dorayme" <> wrote in message


    > > The difficulties of cross popular browser implementation -
    > > without using frames (which have other unrelated problems) - are
    > > a good reason to consider it is not worth using fixed. So too is
    > > something not mentioned so far. Some people report a jerkiness in
    > > the scrolling as a side effect. This also is a good argument
    > > against.

    >
    > I'd always assumed that the "jerkiness" was because the implementation
    > relied on JavaScript - at least on the sites I've seen (but then I never
    > actually looked to see how it was implemented).. If I ever do decide to go
    > down this route I'll try a prototype out on a number of browsers. Certainly
    > if its "jerky" then that's a good reason for not doing it.
    >


    Well no... no lesser a being than Spartanicus [God] has reported
    this as a result of css implementation. Imagine how it shakes and
    shudders for lesser mortals...

    --
    dorayme
    dorayme, Feb 16, 2007
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Philip
    Replies:
    3
    Views:
    929
    Karl Groves
    Jun 28, 2004
  2. Replies:
    0
    Views:
    1,182
  3. morrell
    Replies:
    1
    Views:
    933
    roy axenov
    Oct 10, 2006
  4. Patrick Kowalzick
    Replies:
    5
    Views:
    456
    Patrick Kowalzick
    Mar 14, 2006
  5. AAaron123
    Replies:
    11
    Views:
    1,114
    AAaron123
    Nov 27, 2008
Loading...

Share This Page