Submit Your Article Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read


Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-25-2005, 01:47 AM
richkoi's Avatar
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Atlanta, GA
Posts: 451
richkoi RepRank 0
Default CSS Scrollbars

I am designing a layout in css for a new client. They want to have the content area scrolling which presents a problem because anyone with higher than 800x600 resolution will see a lot of white space. Ideally I would like the scroll area to adjust to the window height. So far, I have had to make a very restricted layout:

http://www.sandiegoborn.org/2005.htm

Any suggestions for improvement? Here is the css file:

http://www.sandiegoborn.org/born.css

Thanks,

Rich
__________________
Me
Reply With Quote
  #2 (permalink)  
Old 05-27-2005, 04:01 AM
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 999
speed RepRank 2
Default

The only thing that comes to mind, is to remove the height from #mainspace now the site makes use of large display areas. Then create some JavaScript to set the height of #mainspace based on the height of the browser.

I've not tried this so I'll be interested if you have any joy with that.

For Firefox you can use:

.box {
position: absolute;
top: 10px;
bottom: 10px;
left: 10px;
right: 10px;
background-color:#CC9966;
overflow: auto;
}

Using that with a <div> makes the <div> change size to match the browser window and enables scroll bars as the window gets too small for the content. Needless to say it doesn't work in IE.

I have a high resolution display, a pet hate of mine is sites that only use a tiny area of the browser window, therefore if you can't change the height dynamically then I wouldn't fix the height.

The other small problem with scroll areas, or at least on my machines, is that the scroll wheel on the mouse doesn't scroll the area.
Reply With Quote
  #3 (permalink)  
Old 05-27-2005, 08:57 AM
WebProWorld Member
 
Join Date: Jul 2004
Location: Netherlands
Posts: 25
leonievs RepRank 0
Default

hmm, can't you advise them not to have a scroll bar like that...?

more and more users are having bigger screens and will see a mini site and a lot of white...

users hate scrolling, especially disabled people, not experienced users or people with rsi complaints.

doe they have a special reason why they would want it like that?
__________________
MultiCards Internet Billing
www.MultiCards.com
Reply With Quote
  #4 (permalink)  
Old 05-27-2005, 01:26 PM
richkoi's Avatar
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Atlanta, GA
Posts: 451
richkoi RepRank 0
Default

The reason they want it that way is so the nav bar stays in view at all time. Is there a way to make the nav bar track down the page as the user scrolls?

Thanks,

Rich
__________________
Me
Reply With Quote
  #5 (permalink)  
Old 05-27-2005, 01:49 PM
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 999
speed RepRank 2
Default

Just found http://soiland.no/frames_with_css/ maybe you can do something with that?

http://www.stunicholls.myby.co.uk/layouts/fixed.html looks interesting too.
Reply With Quote
  #6 (permalink)  
Old 05-27-2005, 03:00 PM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 
Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,181
ADAM Web Design RepRank 1
Default

Is this what you mean?

http://dhtml-menu.com/menu-demos/demo1973.html

Alternatively, you could do something like this:
[code]
#wrapper {
width: 100%; /* values for width and height pulled out arbitrarily. Replace as appropriate. */
height: 500px;
}
#header {
width: 100%;

}
Reply With Quote
  #7 (permalink)  
Old 05-27-2005, 03:05 PM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 
Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,181
ADAM Web Design RepRank 1
Default

Like this for the menu?

http://dhtml-menu.com/menu-demos/demo1973.html

As far as a layout idea goes with a scrolling div, I've done something similar (but it doesn't quite fit into the body of the window because the background pic is too big):

http://www.durasystems.com

The base concept and most of the Javascript would be the same, though.
Reply With Quote
  #8 (permalink)  
Old 05-29-2005, 07:20 PM
richkoi's Avatar
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Atlanta, GA
Posts: 451
richkoi RepRank 0
Default

I combined some of the tips above to create the following:

http://www.sandiegoborn.org/2005.htm
http://www.sandiegoborn.org/born.css

It works perfect in Firefox, other than a few pixels that need to be fixed, but IE refuses to give the wrapper the top margin that I need.

Is there a fix for this without messing up all the tweaks I've made to my css file?

Thanks,

Rich
__________________
Me
Reply With Quote
  #9 (permalink)  
Old 05-30-2005, 03:18 AM
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 999
speed RepRank 2
Default

You can try changing margin-top to padding-top.
Reply With Quote
  #10 (permalink)  
Old 05-30-2005, 10:47 AM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 
Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,181
ADAM Web Design RepRank 1
Default

You could try something like this:
Code:
#wrapper {
    margin-top:  (IE-only margin)
}
#wrapper[id] {
    margin-top:  (FF margin)
}
IE will ignore the #wrapper[id] properties, which is what you want.
Reply With Quote
  #11 (permalink)  
Old 05-31-2005, 03:35 PM
WebProWorld Member
 
Join Date: Nov 2004
Location: London UK
Posts: 43
AccuraCast RepRank 0
Default

The design doesn't seem to be ideal for IE. If the window is resized, the user ends up with a static top and left frame and 2 scroll bars for the vertical content and the window itslef - Very confusing for users.

Have you tried just working with an ordinary
height: 100%; for the main body?
Reply With Quote
  #12 (permalink)  
Old 05-31-2005, 04:47 PM
WebProWorld Member
 
Join Date: Oct 2003
Posts: 29
lightning RepRank 0
Default

Another idea would be to center your page content so the white space on larger screens is shared between the left and right edges. Rather than left justify the page, this creates an effect that is much more pleasing to those with larger screens.
__________________
-Tony
_________________
Lightning Mortgage
Reply With Quote
  #13 (permalink)  
Old 05-31-2005, 04:53 PM
WebProWorld Member
 
Join Date: Oct 2003
Posts: 29
lightning RepRank 0
Default

On a side note, I quickly looked at your logo and subconsciously registed the international 'NO' symbol ( the circle with a slash through it) over 'Born.'

I don't think this is the impression you're trying to give.

This is just an innocent observation.
__________________
-Tony
_________________
Lightning Mortgage
Reply With Quote
  #14 (permalink)  
Old 06-03-2005, 12:47 PM
richkoi's Avatar
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Atlanta, GA
Posts: 451
richkoi RepRank 0
Default

"international 'NO' symbol"

Hmmm, I'll let the site owners know about that.

I think I figured it out. Please have a look and see if anything looks funny:

http://www.sandiegoborn.org/2005.htm
http://www.sandiegoborn.org/born.css

Thanks,

Rich
__________________
Me
Reply With Quote
  #15 (permalink)  
Old 06-03-2005, 01:28 PM
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 999
speed RepRank 2
Default

As accuracast said you get double scroll bars in IE which if nothing else looks strange.

In case you haven't seen it, make IE small so that you get both horizontal and vertical scroll bars, then scroll right as far as you can.

There's also a bug when using IE 6, if I make the browser window short then I can't always scroll with the scroll bar, instead I have to use the mouse wheel. Seems to be reproducible by viewing with a large window then dragging the browser window shorter.

The other point is I don't like the white space to the right of the page, could you go to a fluid layout? I would say center it but I don't think you can.
Reply With Quote
  #16 (permalink)  
Old 06-03-2005, 02:50 PM
richkoi's Avatar
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Atlanta, GA
Posts: 451
richkoi RepRank 0
Default

Yeah, I can't center it as far as I can tell.

Is there any way to get rid of that double scroll bar? Where in the code is that coming from?

Thanks,

Rich
__________________
Me
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:17 AM.



Search Engine Optimization by vBSEO 3.3.0