Why is my header reigion being pushed down

Posted on 2011-09-30
Last Modified: 2012-05-12
My header area/div with the banner is being pushed down about 10 pixels in this website .....

When I created the layout with CSS I placed the header div at the beginning of wrapper div and it was correctly placed at the very top of the wrapper. However, somewhere in the design process this error occurred. I cannot see how this is happening.

All pages are produced from a template. I have enclosed the code for the template and 3 css files
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<link href="../_css/main_layout.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!--[if IE 5]>
<style type="text/css"> 
/* place css box model fixes for IE 5* in this conditional comment */
.twoColFixLtHdr #sidebar1 { width: 230px; }
<!--[if IE]>
<style type="text/css"> 
/* place css fixes for all versions of IE in this conditional comment */
.twoColFixLtHdr #sidebar1 { padding-top: 30px; }
.twoColFixLtHdr #mainContent { zoom: 1; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
<script type="text/javascript" src="../p7mbm/p7MBscripts.js"></script>
<link href="../p7mbm/p7MBM01v.css" rel="stylesheet" type="text/css" media="all" />
<link href="../_css/Styles.css" rel="stylesheet" type="text/css" /></head>
<div class="p7MBfirst" id="wrapper">
  <div id="header">
    <p><img src="../clipart/cocktail.gif" width="940" height="88" /></p>
  <div id="mainBody"><!-- TemplateBeginEditable name="EditRegion1" -->
    <p>Text information space</p>
  <!-- TemplateEndEditable --></div>
  <p class="yellowTextCentIndent">Last Update:<br />
    1st October 2011
  <div id="sidebar">
    <div id="p7MBM_1" class="p7MBM01v">
        <li><a href="../index.html">HOME PAGE</a></li>
        <li><a href="../docs/gallery.html">GALLERY</a></li>
        <li><a href="../docs/setlist1.html">SETLIST 1</a></li>
        <li><a href="../docs/setlist2.html">SETLIST 2</a></li>
        <li><a href="../docs/videos.html">VIDEO</a></li>
        <li><a href="../docs/packages.html">PACKAGES</a></li>
        <li><a href="../docs/contact.html">CONTACT</a></li>
        <li><a href="../docs/links.html">LINKS</a></li>
      <!--[if lte IE 6]>
<style>.p7MBM01v li, .p7MBM01v li a {height: 1%;}</style>
      <script type="text/javascript">
    <p><img src="../pics/groupt_humb.jpg" width="130" height="80" /></p>
  <div id="footer"><a href="../index.html" class="justYellow">GO TO HOME PAGE</a>&nbsp;&nbsp; |&nbsp; &nbsp;&copy; Corner Cocktail Band 2011</div>

Open in new window

Question by:Eirman
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 10

Accepted Solution

jtwcs earned 370 total points
ID: 36891591
There is a <p> tag wrapped around the image in the header.  If you remove it, the space will go away.

<div id="header">
    <p><img src="../clipart/cocktail.gif" width="940" height="88" /></p>
LVL 13

Assisted Solution

by:Andrew Derse
Andrew Derse earned 130 total points
ID: 36891605
Change main-layout.css line 20:


margin: 0;


margin-top: -15px;

Also, I would check into Firebug if I were you.  It's a plugin for Mozilla Firefox that allows you to modify css code directly in the browser so you can see that changes you need to make...
LVL 13

Expert Comment

by:Andrew Derse
ID: 36891610
jtwcs's comment works as well...remove the <p> tag...why is it there?
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 30

Expert Comment

ID: 36891642
Inside your header, you have your image, which is wrapped inside a <p> tag.  Eliminate the <p> tags and see if that helps.
<div id="header">
    <img src="../clipart/cocktail.gif" width="940" height="88" />

Open in new window

LVL 24

Author Comment

ID: 36891664
Thanks jtwcs .... that worked perfectly!

I'll give you your 2000 points after midnight which will be a good start to your October quota.
LVL 24

Author Comment

ID: 36891672
Wow ... I didn't expect more comments and another solution!

Will assign points after midnight
LVL 24

Author Closing Comment

ID: 36897379
Many To Thanks Everyone

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question