CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 6th, 2006, 12:02 AM
sonicparke sonicparke is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 63 sonicparke User rank is Private First Class (20 - 50 Reputation Level)sonicparke User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 11 h 24 m 12 sec
Reputation Power: 4
2 column layout problem

I have this problem on 2 sites I'm working on. I can't seem to nest 2 divs in a content div to create a 2 column layout. In FF it seems to work fine but IE is pushing the left column content down below the right column content. I've tried many things and I'm stuck.

Am I going about the whole concept the wrong way or is there some small hack I'm missing somewhere? Any help would be great.

link

Thanks,

Brad

Reply With Quote
  #2  
Old December 6th, 2006, 06:21 AM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 23rd Plane (16000 - 16499 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 16,407 Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 4 Months 1 Day 14 h 19 m 23 sec
Reputation Power: 1780
Just give #content_left float:left;.

Why are you using XHTML? Either add the xmlns attribute to the <html> tag or switch to HTML 4.01 Strict. After that please fix your X/HTML errors.

There are better clearing techniques that don't require extra markup. I suggest you read up on clearing and containing floats.

Also, you shouldn't put quotes around generic font-family names.
__________________
Spreading knowledge, one newbie at a time.

Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions

Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

Check out my blog.

Reply With Quote
  #3  
Old December 6th, 2006, 08:32 AM
sonicparke sonicparke is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 63 sonicparke User rank is Private First Class (20 - 50 Reputation Level)sonicparke User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 11 h 24 m 12 sec
Reputation Power: 4
Thanks Kravvitz,

I gave #content_left float:left and now it's screwed up in FF as well as IE. One pro is at least they look the same. So what might be causing that?


Also:
I fixed the Doctype.
I'm reading the clearing techniques now and will fix that soon.
I removed the quotes.

Thanks!

Brad

Reply With Quote
  #4  
Old December 6th, 2006, 11:42 AM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 23rd Plane (16000 - 16499 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 16,407 Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 4 Months 1 Day 14 h 19 m 23 sec
Reputation Power: 1780
IE's float model isn't quite right. IE7's is a little better than IE6's.

Due to the left padding you put on #content when you float #content_left as well as #content_right, there isn't enough room for both next to each other.

Don't forget to add some background colors in case the background images fail to load.

Also be sure to fix the HTML errors soon.

IE4 isn't handling your CSS well. (I noticed the url() wrapper, so I thought I'd see how bad it looks. I wouldn't have bothered to look otherwise.) Using double-quotes instead of the url() wrapper will hide the stylesheet from it. (Single quotes will hide the stylesheet from IE5/Mac as well.)
Code:
@import "stylesheet.css";

Reply With Quote
  #5  
Old December 6th, 2006, 01:02 PM
sonicparke sonicparke is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 63 sonicparke User rank is Private First Class (20 - 50 Reputation Level)sonicparke User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 11 h 24 m 12 sec
Reputation Power: 4
OK that worked great once I made the left content div a bit smaller. I added the background colors to the content divs and it shows another issue I've been fighting.

The #content_right div is giving me size fits. If I make it 300px wide it looks great but when I give it a bg color it cuts into the bg image because it's too wide. When I make it 250px wide it shifts way over to the right. I've looked for margin & padding in other styles that might be causing the problem but they haven't seemed to fix it. this is happening in both IE & FF. If I don't specify a bg color it looks great.

You've been extremely helpful so far. Thank you very much.

Edit---

I changed the width of #content_right & #content_left to percentages rather than px and that fixed this issue in FF but not IE.

Last edited by sonicparke : December 6th, 2006 at 02:16 PM.

Reply With Quote
  #6  
Old December 6th, 2006, 10:30 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 23rd Plane (16000 - 16499 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 16,407 Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level)Kravvitz User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 4 Months 1 Day 14 h 19 m 23 sec
Reputation Power: 1780
It looks ok in IE6+7 for me with the percentage widths.

You could do something like this:
Code:
#content-left * {
  background-color: #fff;
}

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > 2 column layout problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT