Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-29-2008, 01:43 AM   PM User | #1
jmculver
New to the CF scene

 
Join Date: Nov 2008
Location: minnesota
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
jmculver is an unknown quantity at this point
Exclamation Automatically fill index page and get rid of horizontal scroll?

I want to disable the horizontal scroll on my index page. I still need the vertical scroll to show up, but only if there is more content to scroll.

I also want to make it so the graphics and contents of the page stay aligned and fill the window even if it is resized by the viewer.

What's the best way to do this?

thanks
jmculver is offline   Reply With Quote
Old 11-29-2008, 02:03 AM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello jmculver,
Quote:
I want to disable the horizontal scroll on my index page.
overflow-x: hidden;
Quote:
I still need the vertical scroll to show up, but only if there is more content to scroll.
Your browser does that on it's own, you don't have to write anything to make it do it.

Quote:
I also want to make it so the graphics and contents of the page stay aligned and fill the window even if it is resized by the viewer.

What's the best way to do this?
Both staying aligned and filling the page are pretty hard to do. Do you have the url of a page that does this?
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 11-29-2008, 11:23 PM   PM User | #3
Apostropartheid
The Apostate


 
Apostropartheid's Avatar
 
Join Date: Oct 2007
Posts: 3,215
Thanks: 16
Thanked 265 Times in 263 Posts
Apostropartheid is on a distinguished road
Quote:
Originally Posted by jmculver View Post
I want to disable the horizontal scroll on my index page.
Don't do that. No, really, don't.
What if someone comes to your site with a small resolution/mobile browser? How will they be able to see anything? And you can't count on mobile medium stylesheets either, because some think they're above that. There are solutions, though: code for 800 or 1024 pixels (choose your personal preference) or have a fluid layout (that's percentages of available screen estate) and live and let live.
I'm guessing that IE is chucking a huge random margin on the right side of your page? IE really likes to do that...
__________________
Blog | Twitter
Useful links: W3C HTML Validator | W3C CSS Validator | HTML 5 Guide
CF: HTML & CSS Resources/Tutorials Thread | HTML & CSS Posting Rules and Guidelines
Remember: no link, no code, no help!

Last edited by Apostropartheid; 11-30-2008 at 10:50 PM..
Apostropartheid is offline   Reply With Quote
Old 11-30-2008, 11:27 AM   PM User | #4
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
I want to disable the horizontal scroll on my index page. I still need the vertical scroll to show up, but only if there is more content to scroll.
Could you post a link to your page to see what's causing that horizontal scroll?
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 01-27-2009, 07:41 AM   PM User | #5
adurian
New to the CF scene

 
Join Date: Jan 2009
Location: Vancouver, BC
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
adurian is an unknown quantity at this point
I have a similar problem. I want to be able to have an image contained in a div that acts as the background image which is resizable, but have content contained in another div that makes the browser window scroll up/down. But it's that div container containing the scroll that is giving me problems, because it's unnecessarily putting horizontal scroll bars on the window. Here's the sample url:
http://www.issbc.org/adrian_test/default.htm

Can anybody give me any hints about what to do to avoid the horizontal scrolling? I would do the overflow-x:hidden trick, but, as mentioned above, I don't want to use it in case of viewers with tiny resolution.

Any help would be greatly appreciated! Thank you!
adurian is offline   Reply With Quote
Old 01-27-2009, 07:53 AM   PM User | #6
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Just have a try by using the method described in http://webdesign.about.com/od/css3/f/blfaqbgsize.htm, which has no overflow:auto;
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 12-04-2009, 03:38 AM   PM User | #7
jmc2009
New to the CF scene

 
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
jmc2009 is an unknown quantity at this point
The frame page and images look fine when viewed on my Macbook Pro with Safari and Firefox.

But I went on my G5 Mac and on Safari and everything is too big for the browser. the images are too big and are cropped (because i have scroll turned off) and then the content has horizontal scroll which shouldnt be there.

(again, its fine on my macbook pro laptop, which i used to create the files)

the website isn't finished. but you can click here.

www.portfolio.jmculver.com

click on portfolio link and you'll see what I mean.

(i know there are some broken images and links, I'm still working on the content but want to make sure i have it fitting the browser)

If i resize everything, then it will be too small on my laptop browser, but fit in the G5 browser?

I want to make it where it isn't going to be too big or small in other people's browsers.

any help?
jmc2009 is offline   Reply With Quote
Reply

Bookmarks

Tags
horizontal scroll, html, resize, window

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 08:34 AM.


Advertisement
Log in to turn off these ads.