Skip navigation
MarcjDJ
Currently Being Moderated

Space Between Image and Table

Aug 20, 2012 3:10 AM

Tags: #image #table #space

Hi all

 

This is an age odl question, but for the life of me I cannot get it right.

 

Did a small website for a company, fly88.co.za

The problem is a horizontal image which needs to be above the menu (designed in a table).

There can't be a space between the two, but I cannot get rid of it!!!

 

Below is the CSS, and the link is www.fly88.co.za

 

Thanks all!

 

 

@charset "utf-8"; body {     text-align: justify;     background-color: #FFFFFF;     margin: 0;     padding: 0;     color: #000;     font-family: "Century Gothic";     font-size: 15px;     line-height: 1.4; } /* ~~ Element/tag selectors ~~ */ ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */     padding: 0;     margin: 0; } h1, h2 {     margin-top: 0;     /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */     padding-right: 15px;     padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */     color: #333;} h3, h4, h5, h6, p {     margin-top: 0;     /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */     padding-right: 15px;     padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */     color: #333; } a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */     margin: 0px;     padding: 0px;     border-top-width: 0px;     border-right-width: 0px;     border-bottom-width: 0px;     border-left-width: 0px;     border-top-style: none;     border-right-style: none;     border-bottom-style: none;     border-left-style: none; } /* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */ a:link {     color:#fc0207;     text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */ } a:visited {     color: #fc0207;     text-decoration: underline; } a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */     text-decoration: none;     color: #900; } /* ~~ this container surrounds all other divs giving them their percentage-based width ~~ */ .container {     width: 840px;     background-color: #FFFFFF;     margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout. It is not needed if you set the .container's width to 100%. */ } /* ~~the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo~~ */ .header {     background-color: #FFFFFF;     font-size: xx-small; } /* ~~ This is the layout information. ~~ 1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design. */ .content {     padding: 10px 0; } /* ~~ This grouped selector gives the lists in the .content area space ~~ */ .content ul, .content ol {     padding: 0 15px 15px 40px; /* this padding mirrors the right padding in the headings and paragraph rule above. Padding was placed on the bottom for space between other elements on the lists and on the left to create the indention. These may be adjusted as you wish. */     font-size: 15px; } td img {     display: block;     text-align: right; } /* ~~ The footer ~~ */ .footer {     background-color: #3C3B3B;     border-top-style: solid;     border-right-style: none;     border-bottom-style: none;     border-left-style: none;     border-top-width: medium;     border-right-width: medium;     border-bottom-width: medium;     border-left-width: medium;     border-top-color: #3C3B3B;     text-align: center;     color: #FFF; } /* ~~ miscellaneous float/clear classes ~~ */ .fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */     float: right;     margin-left: 8px; } .fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */     float: left;     margin-right: 8px; } .clearfloat { /* this class can be placed on a
or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */     clear:both;     height:0;     font-size: 1px;     line-height: 0px; } }
 
Replies
  • Currently Being Moderated
    Aug 20, 2012 4:10 AM   in reply to MarcjDJ

    Hello,

     

    provided that I understood you in the right way, I made these changes beginning from your "<div class="header">"

     

    <div class="header">

       <table width="900" border="0" align="center" cellpadding="0" cellspacing="0">

         <tr>

           <td width="691" rowspan="2"><img src="images/header/left.png" width="337" height="161" alt="Fly 88"></td>

           <td width="209" height="55" align="right"><h6>All flights operated by Studio 88 Aviation</h6><br><a href="#weather"><img src="images/header/right2.jpg" width="92" height="31" alt="weather" align="right"></a></td>

         </tr>

         <tr>

           <td><img src="images/header/right.jpg" width="209" height="75" alt="Contact details" align="top"></td>

         </tr>

       </table>  

       <p><img src="images/header/TopBar.png" alt="TopHorBar" width="100%" vspace="0" border="0"></p>

       <table width="100%" border="0">

         <tr>

           <td width="16%"> </td>

           <td width="68%" align="center" valign="middle"><div align="center"><img src="images/Home1.jpg" width="828" height="215" alt="Fly 88 Kingair 1900"></div></td>

           <td width="16%"> </td>

         </tr>

       </table>

     

    It might be a key to your own to conduct further trials to optimise the process, which I can't carry out due to your html template.

     

    Good luck!

    Hans-Günter

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 20, 2012 4:53 AM   in reply to MarcjDJ

    You have an extra closing brace at the bottom of your CSS -

     

    font-size: 1px;     line-height: 0px; } }

     

    Try changing this -

     

    <img src="images/header/TopBar.png" alt="TopHorBar" width="100%" vspace="0" border="0">

     

    to this -

     

    <img src="images/header/TopBar.png" alt="TopHorBar" width="100%" style="display:block;">

     

    and see if that helps.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 20, 2012 6:33 AM   in reply to MarcjDJ

    Hi Marc

     

    This may be heresy, but after failing to chase down the cause of a minor anomaly like this, ther comes a time to cut your losses and resolve the issue in another way.

     

    Could you just edit your image by sliding it lower on the canvas?

     

    left.png

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 20, 2012 7:05 AM   in reply to MarcjDJ

    Hi Marc,

     

    I still do not understand the matter in the right way, therefore I show yo ua screenshot of my IE8. Please mark those things for me.

     

    drFly.jpg

     

    Hans-Günter

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points