Topic: Confusion

Happy Friday everyone

Once again I am stumped.

I have an issue with Fire fox and IE and I am hoping you can lead me in the right direction or correct IE comment.

I have a 3 Col. Fixed Layout 950px wide.

In Firefox - the Container is not white as hoping for, Changing my elements borders to white - (Against the bodies 192543 color bg ) - the layout looks fine

In IE - the container is white. However, with my borders white - I can not tell if the layout is ok.

Where is my error for the container not being in White in FF, and how can I tell if my layout is ok in IE. As alwyas - thank you for your professional and reputable input

(I have included the code below. This is in DW CS4, however I am using my own code in a new HTML page)

Brian

The CSS

body {
   
    background-color: #192543;
    margin: 0 auto;
    padding: 0auto;
    text-align: center;
   
}

#Container {
   
    background-color: white;
    width: 958px;
    margin: 0 auto;
    text-align: left;
   
}

#Header {
   
    height: 100px;
    margin: 0 auto;
    background-color: #A9A9A9;
   
}

#Navigation {
   
    background-color: #000033;
    height: 25px;
    padding: 5px;
   
}

#leftColumn {
   
    float: left;
    width: 180px;
    height: 500px;
    margin: 100px 15px 50px 15px;
    padding: 10px 10px;
    border: 1px solid white;
}

#Time {
   
    float: left;
    width: 300px;
    height: 100px;
    margin: 100px 15px 15px 0px;
    padding: 5px;
    border: 1px solid white;
   
}

#Now {
   
    float: left;
    width: 100px;
    height: 80px;
    margin: 100px 15px 15px 0px;
    padding: 5px;
    border: 1px solid white;
   
}

#Statement {
   
    float: left;
    width: 425px;
    height: 150px;
    margin: 0px 15px 15px 0px;
    padding: 5px;
    border: 1px solid white;
   
}

#Movies {
   
    float: left;
    width: 200px;
    height: 100px;
    margin: 0px 15px 15px 0px;
    padding: 5px;
    border: 1px solid white;
   
}

#Music {
   
    float: left;
    width: 200px;
    height: 100px;
    margin: 0px 15px 15px 0px;
    padding: 5px;
    border: 1px solid white;
   
}

#News {
   
    float: left;
    width: 425px;
    height: 150px;
    margin: 0px 15px 50px 0px;
    border: 1px solid white;
   
}
       

#rightColumn {
   
    float: right;
    width: 245px;
    height: 480px;
    margin: 140px 15px 40px 0px;
    padding: 5px;
    border: 1px solid white;
   
}

#Footer {
   
   
    height: 100px;
    width: 950px;
    margin: 0 auto;
    background-color: #A9A9A9;
    clear: both;
   
}
   

</style>

</head>

The HTML

<body>

                    <!-- Container -->

    <div id="Container">
   
                    <!-- Header -->

       <div id="Header"></div>
       
                    <!-- Navigation -->
       
        <div id="Navigation"></div>
       
                    <!-- Left Column -->
       
        <div id="leftColumn"></div>
       
                    <!-- Right Column -->

       <div id="rightColumn"></div>
       
                    <!-- Time -->

   <div id="Time"></div>
   
                      <!-- Now -->

  <div id="Now"></div>
 
                      <!-- Statement -->
 
   <div id="Statement"></div>
   
                       <!-- Movies -->

   <div id="Movies"></div>
   
                       <!-- Music -->

    <div id="Music"></div>
   
                    <!-- Time -->

  <div id="News"></div>
 
</div>

</div>

                    <!-- Footer -->

<div id="Footer"></div>


</body>

</html>

Vote up Vote down

Re: Confusion

For starters, you have an extra div closing tag right above your footer.

The reason the background is not showing white in your Container, is that everything in the container floats - so doesn't actually take up any space.  You either have to give it a height - or better, move your footer INSIDE the container - then everything turns white.

A couple more hints:

Always use lower case for your ID and class names - less confusion.

No need to write 0px - zero is zero

No need to align center the body (that's IE5) - just adding the margin: 0 auto to the container centers it.

Use shortcuts - this:

margin: 0px 15px 15px 0px;

could be

margin: 0 15px;
Just because my computer is online does not mean that I am.
a&b WebDesign

Vote up Vote down

Re: Confusion

As always - thank you! I will give it a go Thelma...

Vote up Vote down

Re: Confusion

Thank you Thelma - it worked!

I have 1 more dilemma now - the firefox view - I have the wanted margin between the bottom element and the footer. However - in IE - the bottom element is up[ against the footer? Any suggestions? Below is my code...

thank you again

Brian

CSS

body {
   
    background-color: #192543;
    margin: 0 auto;
    padding: 0auto;
   
}

#container {
   
    background-color: white;
    width: 958px;
    min-height: 950px;
    margin: 0 auto;
    text-align: left;
   
}

#header {
   
    height: 100px;
    margin: 0 auto;
    background-color: #A9A9A9;
   
}

#navigation {
   
    background-color: #000033;
    height: 25px;
    padding: 5px;
   
}

#leftColumn {
   
    float: left;
    width: 180px;
    height: 500px;
    margin: 100px 20px 50px 5px;
    padding: 10px 10px;
    border: 1px solid #192543;
}

#time {
   
    float: left;
    width: 300px;
    height: 100px;
    margin: 100px 15px 15px 0px;
    padding: 5px;
    border: 1px solid #192543;
   
}

#now {
   
    float: left;
    width: 100px;
    height: 80px;
    margin: 100px 15px 15px 0px;
    padding: 5px;
    border: 1px solid #192543;
   
}

#statement {
   
    float: left;
    width: 425px;
    height: 150px;
    margin: 0px 15px 15px 0px;
    padding: 5px;
    border: 1px solid #192543;
   
}

#movies {
   
    float: left;
    width: 200px;
    height: 100px;
    margin: 0px 15px 15px 0px;
    padding: 5px;
    border: 1px solid #192543;
   
}

#music {
   
    float: left;
    width: 198px;
    height: 100px;
    margin: 0px 15px 15px 0px;
    padding: 5px;
    border: 1px solid #192543;
   
}

#news {
   
    float: left;
    width: 435px;
    height: 120px;
    margin: 0px 15px 50px 0px;
    border: 1px solid #192543;
   
}
       

#rightColumn {
   
    float: right;
    width: 245px;
    height: 480px;
    margin: 140px 5px 40px 0px;
    padding: 5px;
    border: 1px solid #192543;
   
}

#footer {
   
   
    height: 100px;
    width: 958px;
    margin: 0 auto;
    background-color: #A9A9A9;
    clear: both;
   
}
   

</style>

</head>

HTML

<body>

                    <!-- Container -->

    <div id="container">
   
                    <!-- Header -->

       <div id="header"></div>
       
                    <!-- Navigation -->
       
        <div id="navigation"></div>
       
                    <!-- Left Column -->
       
        <div id="leftColumn"></div>
       
                    <!-- Right Column -->

       <div id="rightColumn"></div>
       
                    <!-- Time -->

   <div id="time"></div>
   
                      <!-- Now -->

  <div id="now"></div>
 
                      <!-- Statement -->
 
   <div id="statement"></div>
   
                       <!-- Movies -->

   <div id="movies"></div>
   
                       <!-- Music -->

    <div id="music"></div>
   
                    <!-- News -->

  <div id="news"></div>
 
</div>
                    <!-- Footer -->

<div id="footer"></div>

</div>

               

</body>

</html>

Vote up Vote down

Re: Confusion

See if giving the footer a margin-top helps.  And you still have an extra closing div - it's between the news and footer division.

If that doesn't do it - add a * {margin: 0; padding: 0;} to the very top of your CSS and remove the margin and padding settings from your body tag.

Just because my computer is online does not mean that I am.
a&b WebDesign

Vote up Vote down

Re: Confusion

An add... background-color can be just background. Padding 10px 10px can be just 10px. If your floating something and using margin (in the direction of the float) then also add display inline to kill ie6 bug. Or you can use padding to space to avoid the bug. Take away the margin and padding on the body - they're doing nothing. Remove text-align left on the container - it's not needed unless your specify other in it's parent (usually the body) which is not needed unless you care about IE5 (which you shouldn't). I assume the header is stretching the full width of the container, therefore, no need for the margin. I see you declared a height on everything, if you want those divs to grow along with the content, then remove the height. And as Thelma said, remove the px off the zeros. These are just suggestions, do with them as you will.

Vote up Vote down

Re: Confusion

Why does everyone appear to be offline to me? Thelma just posted, so I know she is, yet it shows she's not...

Vote up Vote down

Re: Confusion

Hmm ... another thing on the list to look at.

Stefan

Practical web design training videos: KillerSites University

Vote up Vote down

Re: Confusion

thank you Thelma and Eric....

Vote up Vote down

Re: Confusion

Sorry Eric - I did not use display: inline on my floated elements. You mention in direction of the float. So if I am floating left - and have a Margin-left of more than 0; I would use display: inline?

In FF and IE - (From DW view) both look fine. I emailed it so I can look over today at work - and 2 divisions (Music and Movies) is moved to the right of time (Should be below Statement)? Is this because it was emailed?

Also I have a fading color for the background. I made this bg from PS Cs4. The color is blue - when I pulled up my sent email to check the page - the background is white. I also have a fading color for headings - this is a solid blue color - not faded as hoped for?

In all my dillemma:

In Dreamweaver - the IE and FF screen shows the layout to be fine

I emailed it to look over at work. I check my sent email to pull it up and the Movies and Music div's are moved. Along with the  background color white - not a fading blue color. Also my headings are a solid blue color - not faded.

as always thank you -

Vote up Vote down

Re: Confusion

Hi, yes that is correct about about the floats. Never look in DW view unless it's simply to edit text. From the sounds of it, you need to setup a proper testing enviroment. Download and install all the big guys (browsers), and install firebug for FX. Then set it up in DW to open any page your working on in any browser of your choosing.

Vote up Vote down

Re: Confusion

Minor point -- when you sent your email, did you remember to attach the necessary images as well? That may be why they aren't showing up for you.

Benjamin Falk | Falken Creative : Twitter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter

Vote up Vote down

Re: Confusion

Eric -

Thank you! I am self taught through W3Schools and articles etc. It is a tough journey but I enjoy it. When I get frustrated - I find my self still in front of the computer pounding away. That is how and why (besides my artistic background) that I know this is the career for me.

Falken

I do not think I did. On Notepad - I would download and attach photos from my Photobucket acct. I did not do that this time.

Thanks again guys!

Brian

Vote up Vote down

Re: Confusion

Your welcome! Here are all the browsers and some of the better add-ons.

Vote up Vote down

Re: Confusion

thanks Eric for the resources..

Nice job

Vote up Vote down