Grow your CSS skills. Land your dream job.

fixed width box with scrollbar height of the full window

  • # October 26, 2009 at 10:53 am

    Hello,

    I’m new here but have been coding w/ CSS for about 3 years now. I was wondering if anyone had a solution for this scenario.

    I’m trying to make a fixed width, fixed height box that "mimics" overflow:scroll, but the scroll bar is actually the widow scrollbar (or a pseudo-window scrollbar). What I mean by that is, the box is sitting there and you have the scroll bar on the side of the browser scroll the box contents up and down. Possible with just css? If not, is there a solution with javascript?

    # October 26, 2009 at 5:04 pm

    personally, if i wanted that effect I would place a div with my text as the background, use another div as a window. that would get the effect you want, maybe:

    http://www.csszengarden.com/?cssfile=202/202.css

    # October 26, 2009 at 5:20 pm

    See, I am doing that, but my "window" (window from here on out is referring to the hole I create not the OS window.) is a TV and I wasn’t able to get an version that scaled proportionally. That layout you referred too allows for a varying width window, my widow needs to be fixed size. I have a mostly complete demo, I’ll upload it an post a link, but I’m having issues in chrome and safari with the TV not sitting at the bottom of the screen.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".