Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
floated divs and going to the next line
Old 07-14-2011, 01:23 AM floated divs and going to the next line
Extreme Talker

Posts: 176
Trades: 0
if 2 divs that are floated to the left are next to each other, but they add up to be more than the page size, then they are forced onto different lines.

is there a way to allow them to stay on the same row and just let there be a horizontal scroll bar?
Skeddles is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-14-2011, 07:37 AM Re: floated divs and going to the next line
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
You could try giving the html and body elements a max-width greater than 100%.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-14-2011, 07:39 AM Re: floated divs and going to the next line
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
BTW;

Is this you as well??
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-14-2011, 12:53 PM Re: floated divs and going to the next line
Extreme Talker

Posts: 176
Trades: 0
Quote:
Originally Posted by chrishirst View Post
BTW;

Is this you as well??
tis not me, but sounds like a similar problem.

so I assume you just mean set body and html to 200% or something? I'd like to have it so that it could be infinitely big. should I calculate and size it dynamically? (I think that would be no problem with jquery, which is how I'm adding and resizing elements anyway.)



EDIT: maybe I should just put them in a div with overflow:hidden and use a jquery slider

Last edited by Skeddles; 07-14-2011 at 01:00 PM..
Skeddles is offline
Reply With Quote
View Public Profile
 
Old 07-14-2011, 01:27 PM Re: floated divs and going to the next line
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Personally I've never been very fond of horizontal scrolling. My advice would be to rework your design so that you won't need more than the screen width.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is online now
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 07-14-2011, 11:42 PM Re: floated divs and going to the next line
Extreme Talker

Posts: 176
Trades: 0
Quote:
Originally Posted by lizciz View Post
Personally I've never been very fond of horizontal scrolling. My advice would be to rework your design so that you won't need more than the screen width.
I think it would work for my site though, it's a bit non-standard
I mean to have multiple columns that scroll infinitely down by loading new content with ajax
Skeddles is offline
Reply With Quote
View Public Profile
 
Old 07-15-2011, 04:16 AM Re: floated divs and going to the next line
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
If they're gonna scroll infinitely in the vertical direction, then why do you also need horizontal scrolling? Or will you have different contents in a lot of different columns?
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is online now
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 07-15-2011, 04:32 AM Re: floated divs and going to the next line
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
You do realise that you are simply trying to recreate a multiple column table layout with divs, so why not just use a table?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-15-2011, 10:24 AM Re: floated divs and going to the next line
Extreme Talker

Posts: 176
Trades: 0
Quote:
Originally Posted by chrishirst View Post
You do realise that you are simply trying to recreate a multiple column table layout with divs, so why not just use a table?
everyone speaks of people using tables for layouts as if they're the worst thing in the world.

though my layout would require no images, so it would most likely work, as long as they can be resized dynamically with jscript, which they most likely can
Skeddles is offline
Reply With Quote
View Public Profile
 
Old 07-15-2011, 01:33 PM Re: floated divs and going to the next line
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Just make sure the sum of the widths of the columns never exceed the overall width of the layout. There really shouldn't be a need for them to grow horizontally.

You can use % for everything if you want. If your layout is 100% of the browser then set each of 2 columns to 50% (don't forget to take any padding on the columns into account). What's inside your columns should reflow.

If you find that your columns get filled with information causing them to grow to wide then you probably need to tweak your design to use less columns.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 07-15-2011, 05:28 PM Re: floated divs and going to the next line
serandfae's Avatar
Do the "Evil Nanner" !!!

Posts: 9,007
Name: Tim Daily
Location: Apex, NC, US, Sol 3
Trades: 0
Quote:
Originally Posted by Skeddles View Post
everyone speaks of people using tables for layouts as if they're the worst thing in the world.
True that, but if what you're putting up IS a table, use a table. The intent is the right tool for the job.

tim
__________________
SEO "experts" smell like Big Fish_|_
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

serandfae is offline
Reply With Quote
View Public Profile Visit serandfae's homepage!
 
Reply     « Reply to floated divs and going to the next line
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.90514 seconds with 12 queries