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 August 22nd, 2003, 06:03 PM
chapsymphony chapsymphony is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 24 chapsymphony User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 27 sec
Reputation Power: 0
CSS, Netscape and float problems

Oh man this drives me crazy. Here is my HTML:

Code:
<div id="outerbox">
	<div id="left">
		Left Hand Float...
	</div>

	<div id="right">
		Right Hand Float...
	</div>
</div>


And here is my CSS:

Code:
#outerbox {
	border: 1px solid #454545;
	margin: 10px auto 0px;
	padding: 8px 20px;
	width: 738px;
}
#left {
	background-color: #efefef;
	float: left;
	width: 500px;
}
#right{
	background-color: #efefef;
	float: left;
	margin-left: 10px;
	width: 220px;
}


And this is what it does in Netscape:



What can I do about this?

Reply With Quote
  #2  
Old August 22nd, 2003, 06:07 PM
rendy's Avatar
rendy rendy is offline
Moderator
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: London
Posts: 348 rendy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 17 sec
Reputation Power: 7
Hmm renders fine in mozilla and ie...

Reply With Quote
  #3  
Old August 22nd, 2003, 06:15 PM
chapsymphony chapsymphony is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 24 chapsymphony User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 27 sec
Reputation Power: 0
Yeah, it should work in Netscape too I guess because theoretically it uses the same rendering engine as Mozilla.

Another thing I forgot to add: if I set the float value of the container to 'left' then i no longer get the whole thing centered on the page (which I did using: margin: 10px auto 0px; ). Weird.

Reply With Quote
  #4  
Old August 22nd, 2003, 06:33 PM
retromonkey retromonkey is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Dallas, Texas
Posts: 19 retromonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to retromonkey
What version of netscape?

Reply With Quote
  #5  
Old August 22nd, 2003, 06:53 PM
chapsymphony chapsymphony is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 24 chapsymphony User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 27 sec
Reputation Power: 0
Version 7.1

Reply With Quote
  #6  
Old August 22nd, 2003, 07:15 PM
jerom jerom is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Posts: 1,014 jerom User rank is Corporal (100 - 500 Reputation Level)jerom User rank is Corporal (100 - 500 Reputation Level)jerom User rank is Corporal (100 - 500 Reputation Level)jerom User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 17 h 34 m 25 sec
Reputation Power: 9
I'm not really sure what you think is the problem. I think that Mozilla is correctly displaying part of the content outside of the outerbox (a float is taken out of the flow, and there is no height defined for the outerbox).

I assume from your gif text that you want all of the text to be inside the outerbox.

Try either of the following (I think you will like one of them):
.add 'overflow: auto;' to the #outerbox style
.add '<div style="clear: both"></div> to your HTML code, after the 'right' div inside the outerbox.

Hope this helps,
Jeroen

Reply With Quote
  #7  
Old August 26th, 2003, 09:23 PM
retromonkey retromonkey is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Dallas, Texas
Posts: 19 retromonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to retromonkey
hey chapsymphony,

Sorry it took a few days to reply. I just ran across this short article and I thought about your problem. It may not be the answer, but you might be able to apply it to your problem somehow. I sure hope it helps.

Article: "Containing Floats" by Complex Spiral Consulting
http://www.complexspiral.com/public...taining-floats/


Have fun!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS, Netscape and float problems


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


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

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway