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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Alternative to overflow:auto (sidebar without tables)
Old 05-18-2010, 03:40 PM Alternative to overflow:auto (sidebar without tables)
Junior Talker

Posts: 3
Trades: 0
Hello,

I am currently making a vBulletin skin, and was wondering if there were any alternative to overflow: auto? The thing is, I'm trying to create a sidebar without tables AND with a fluid wrapper.

My CSS code looks like this:
Code:
#wrapper {
 width: 90%;
 min-width: 980px;
 margin: 10px auto 0 auto;
 background: #1a1a1a url(images/magnetic/style/wrapper.png) repeat-x top left;
 border: 1px solid #161616;
 overflow-x: hidden;
 -moz-border-radius: 8px 8px 8px 8px;
 -webkit-border-bottom-left-radius: 8px;
 -webkit-border-bottom-right-radius: 8px;
 -webkit-border-top-left-radius: 8px;
 -webkit-border-top-right-radius: 8px;
}

#right-content {
 float: right;
 width: 275px;
 color: #7a7a7a;
 padding: 15px 0;
}

#left-content {
 margin: 0px 0 0 0;
 background: #e9ecee url(images/magnetic/style/bg-main.gif);
 padding: 0px;
 min-height: 800px;
 overflow: auto;
 overflow-x: hidden;
 -moz-border-radius: 8px 8px 8px 8px;
 -webkit-border-bottom-left-radius: 8px;
 -webkit-border-bottom-right-radius: 8px;
 -webkit-border-top-left-radius: 8px;
 -webkit-border-top-right-radius: 8px;
}
And here's what the HTML looks like:
Code:
<div id='wrapper'>

        <div id='right-content'>

Right content (sidebar) here

        <!--end right--></div>

            <div id='left-content'>

The left content here

            </div>
</div>
The thing is, when the overflow is there, the page looks fine BUT it has issues when opening, for example, dropdown menu or expanding a big image.

Here's what it does when opening a dropdown menu:


Here's what it does when trying to open an image:


So what I'm trying to do, is to create a fluid layout with a right sidebar without tables. It's working, although I'm looking for some code modifications so it doesn't have issues with the dropdowns etc. Basically, it seems that everything looks fine BUT when we open something that is "larger" than the #left-content ID. Then it creates issues.

Any idea?

Thank you so much in advance.
nenon is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-18-2010, 05:36 PM Re: Alternative to overflow:auto (sidebar without tables)
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
I'm not understanding why you need overflow: auto in the first place. You should be able to create a 2 column layout without one. Usually I float both columns to the left, though some people prefer floating one column to the left and one to the right.

What are you trying to accomplish with overflow at the moment?
__________________
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 05-18-2010, 05:48 PM Re: Alternative to overflow:auto (sidebar without tables)
Junior Talker

Posts: 3
Trades: 0
The thing is, I can't just float both columns because then it will mess up when changing the resolution (making it smaller - 1280x1024 or smaller). I need one fluid column (left) with one fixed column (right sidebar).
nenon is offline
Reply With Quote
View Public Profile
 
Old 05-18-2010, 06:12 PM Re: Alternative to overflow:auto (sidebar without tables)
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
You should be able to set that up without overflow. Floating and being fluid are different things. You can float both columns, give the sidebar a fixed width, and not give the main content column a width so it can be a fluid column. As the resolution changes the left column will expand and contract accordingly.
__________________
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 05-19-2010, 10:08 AM Re: Alternative to overflow:auto (sidebar without tables)
Junior Talker

Posts: 3
Trades: 0
Floating both elements will not work. Well it will, but when you reach a certain resolution, everything will mess up. Here's a screenshot of the 2 elements being floated (left content floated to left and sidebar floated to right) with a resolution of 1280x1024. Floating both elements is useful for fixed layouts only.

nenon is offline
Reply With Quote
View Public Profile
 
Old 05-19-2010, 02:17 PM Re: Alternative to overflow:auto (sidebar without tables)
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
Floating both elements is useful for fixed layouts only.
That's just not true, if it were, then there would be a ton of fluid layouts that wouldn't be around today.

If you're using overlflow:auto to clear floats, then you cannot set a width or height on that same element w/o getting scrollbars. You must also be VERY careful with your dimensions, margins and padding - meaning you need to completely understand the box model.

There are also other methods for clearing floats. It's nearly impossible to know what to suggest when we can't SEE the problem in action - videos and screenshots don't help.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

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


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

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-19-2010, 06:15 PM Re: Alternative to overflow:auto (sidebar without tables)
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Floated elements work fine in fluid layouts. If your content is dropping like that it's not being cause by the float. It's something else. Like LNR said if you can post a link or at the very least some code it will be easier to help.

My gut tells me that the problem is something inside your content area does have a width set on it that's forcing the whole column to be at least a minimum width.

Also if you float both columns to the left it's more likely the column on the right would be the one to drop down.
__________________
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!
 
Reply     « Reply to Alternative to overflow:auto (sidebar without tables)
 

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 1.95185 seconds with 12 queries