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
Wrapper breaking in FF, looks fine in IE
Old 01-19-2007, 03:06 PM Wrapper breaking in FF, looks fine in IE
Junior Talker

Posts: 1
Trades: 0
So being new to CSS I've been reading forums and tutorials for the past week or so. I notice that most people seem to have a problem with IE not rendering the site properly. Oddly enough IE is doing exactly what i want it to but in Firefox it appears that the code is not setting everything inside the wrapper. It could be an issue with Dreamweaver not liking FF. *note
I am using dreamweaver to see what is happening but i am writing the code by hand, as I would imagine this is the only way to get understand what is happening and why.

I made Screenshots of FF and IE so you can see what's happening.

FF-
IE-
and here is the code

Quote:
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="style.css" rel="stylesheet" type="text/css" />

</head>

<body>

<div id="wrapper"> <!----Opens Wrapper---->
<div id="header"><!----Opens Header----->
</div><!----Closes Header---->
<div id="content">
<div class="entry">
<h1 class="h1">ND International Launches <span class="h2">1.19.07</span></h1>
<p>Today the wonder of industries, the prize of technological terrors, the erudite of wizards (???), WWND INDUSTRIES(!!!!) is proud to annouce the re-opening of their web presence! You may have thought we were gone, and the world was safe for democracy, but little did you know that we've been here the whole time! MUWAHAHHAH! We just haven't been updating our web-page...

There are many harrowing tales of our various, heretonow, untold and DEEP HURTING SECRET operations from the last couple years (where we weren't posting about them), but in the coming days (weeks, months, years, decades...you get the idea) the wonder that is WWND INDUSTRIES will explain, exploit and tantalize you as we did before! Soon, yes very soon...

In the meantime!!! WWND INDUSTRIES is pleased to annouce their reorganization into ND INTERNATIONAL. This new name reflects years of test marketing (and one founder meeting that occured several years ago and under the influence of copious amounts of root beer). We are now an fully international company, decimating humanity and industry alike (with or without discretion, at our discretion) on all fronts! More to come later, suckers!!!! </p>
</div>
<div class="entry">
<h1 class=h1>New Mission Statement <span class="h2">2.1.07</span></h1>
<p>" The mission of ND International is to aquire as much profit as humanly possible and to make the upper management, especially the founders, richer than they ever imagined"

Explanation of the mission statement
see here at The ND ( short for Nd International) we don't lie about our real strategic goals. Most Companies have mission statements that give the illusion of a well thought out strategic statement that defines the direction of the company, what they are about, and why they are here. In reality, everyone ,from the bottom to the top, in the organization knows why the organization really exists, to make the upper management richer. Here at the Nd we pride ourselves in our honesty with our employees or public.</p>
</div>
</div>
<div id="sidebar">
<div class="sidebarentry">
<div align="center"><img src="../In-Progress-Images/not_thenick.jpg" width="172" height="194" />
<span class="style1">The Glorious Founder-</span>
</div>
<p>*note not actual founder. due to security concerns we must protect his identity</p>
</div>
</div>
</div>



</body>
</html>
And the CSS
Quote:
/* CSS Document */
body {
text-align: center;
background-color: #CCCCCC;
}
#wrapper {
width: 731px;
margin: 0 auto;
text-align: left;
border: solid #000 1px;
background-color: #ffffff;
margin-bottom: 10px;
padding-bottom: 20px;
}
/*Header */
#header {
width: 731px;
background-image: url(../In-Progress-Images/header_c.jpg);
height: 160px;
}
/*content */
#content {
width: 500px;
background-color:#ffffff;
float: left;
padding-top: 10px;
}
.entry {
font-size: 12px;
color:#000000;
border-top: #000 dashed 1px;
border-bottom: #000 dashed 1px;
text-decoration: none;
padding-left: 3px;
}
.h1 {
font-size: 20px;
color: #3D85BF;
}
.h2{
font-size: 16px;
color: #B0AF90;
}
.style1 {
font-size: 16px;
font-weight: bold;
}

/*sidebar */
#sidebar{
width:180px;
border: #000 solid 3px;
text-decoration: none;
float: right;
margin-right: 5px;
margin-top: 10px;
}
.header {
background-color:#CCCCCC;
color: #000
}
.sidebarentry {
background-color: #FFF;
font-size: 10px;

}

.style2 {
font-size: xx-small;
}

/*footer */
#footer{
width: 731px;
}
Scite_Ipsos is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-19-2007, 06:37 PM Re: Wrapper breaking in FF, looks fine in IE
vangogh's Avatar
Post Impressionist

Posts: 10,688
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Is the page itself online somewhere? It's easier to find the solution by being able to see the live page. If it is post a link.

I think what's going on though (and Firefox has it right) is that by floating both the content and the sidebar there's nothing inside the wrapper as far as the document flow. When you float something or use positioning it takes that element out of the document flow. As far as the wrapper is concerned there's nothing inside and so it has no height and you don't see the white background.

The solution is pretty simple. Take the float: left off the content div. It should sit exactly where it is by default, but by taking the float out of the css it will fall back into the normal document flow and the wrapper div should wrap around everything like you want.

A lot of using css to layout a site is knowing when not to use floats or positioning. Usually it only needs to be added to one or two key elements.

Hope that helps, but if not I'll try again.
__________________
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 01-21-2007, 08:04 PM Re: Wrapper breaking in FF, looks fine in IE
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
No need to remove the floats, just be sure you CLEAR the floats you are using. Once you clear the float, then FF will wrap your content.

http://css-discuss.incutio.com/?page=ClearingSpace
__________________
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
 
Reply     « Reply to Wrapper breaking in FF, looks fine in IE
 

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