SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Addict sstaubin01's Avatar
    Join Date
    Nov 2000
    Location
    Ont, Canada
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm using SSI to place common banners in all pages of my site.
    <!--#include virtual="includes/LeftBanner.htm"-->
    I want the Top Banner and Left Banner to appear as a seamless graphic. I do this by setting cellspacing and cellpadding to 0 in the tables where the images are. Before using SSI's this worked fine but after SSI, there is a blank line seperating the images as would be if cellspacing and cellpadding were set to something other than 0.

    Any ideas how to get rid of the blank line?

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Brian...without seeing your code, I would say that you probably have the SSI's on two lines like this right?

    <!--#include virtual="includes/LeftBanner.htm"-->
    <!--#include virtual="includes/TopBanner.htm"-->

    You will probably need to put them on the same line.

    <!--#include virtual="includes/LeftBanner.htm"--><!--#include virtual="includes/LeftBanner.htm"-->

    If you need tight alignment in table cells then they really need to be on the same line, the same would go for included code.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    SitePoint Guru CJ's Avatar
    Join Date
    Apr 2000
    Location
    Mechelen, Belgium, Europe
    Posts
    684
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by creole
    Brian...without seeing your code, I would say that you probably have the SSI's on two lines like this right?

    <!--#include virtual="includes/LeftBanner.htm"-->
    <!--#include virtual="includes/TopBanner.htm"-->

    You will probably need to put them on the same line.

    <!--#include virtual="includes/LeftBanner.htm"--><!--#include virtual="includes/LeftBanner.htm"-->

    If you need tight alignment in table cells then they really need to be on the same line, the same would go for included code.

    Sorry.. but that makes no sense to me

  4. #4
    SitePoint Addict
    Join Date
    Oct 2000
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've also seen this occur -- in Netscape, only -- with dynamic content, as NS sometimes appears to be unable to parse the dynamic material before it parses the surrounding table. In that case, a (non-dynamic) spacer image may be needed to "hold place" in the table for the dynamic content.

  5. #5
    SitePoint Guru CJ's Avatar
    Join Date
    Apr 2000
    Location
    Mechelen, Belgium, Europe
    Posts
    684
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you have an url?

  6. #6
    Fluffy Kitten Programmer~ Elledan's Avatar
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    1,356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by creole
    Brian...without seeing your code, I would say that you probably have the SSI's on two lines like this right?

    <!--#include virtual="includes/LeftBanner.htm"-->
    <!--#include virtual="includes/TopBanner.htm"-->

    You will probably need to put them on the same line.

    <!--#include virtual="includes/LeftBanner.htm"--><!--#include virtual="includes/LeftBanner.htm"-->

    If you need tight alignment in table cells then they really need to be on the same line, the same would go for included code.
    This does make sense if you realize that you can accidentally have used <enter> one time too much while typing the includes. Further I can't think of anything else...
    www.nyanko.ws - My web-, software- and game development company.
    www.mayaposch.com - My personal site and blog.

  7. #7
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll explain CJ...some browsers, even IE, see a carriage return or "hard return" as a space. If you need tight alignment in your tables, then it would be wise to put your table cells (at least) on the same line like so:

    <table>
    <tr>
    <td><img src="images/header_logo_left.gif"></td>
    </tr>
    </table>

    See how the TD, contents and /TD are all on the same line? That is what I mean.

    Sometimes it is even necessary to do this:

    <table>
    <tr><td><img src="images/header_logo_left.gif"></td></tr>
    </table>

    although very rarely. So, if you ever have a problem with a tiny bit of space in your table (even if you have cellpadding, cellspacing and border set to 0, then try getting rid of some of your hard returns. The big drawback to that method is that it makes code much more difficult to read.
    <Edited by creole on 11-27-2000 at 10:13 PM>
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  8. #8
    SitePoint Addict sstaubin01's Avatar
    Join Date
    Nov 2000
    Location
    Ont, Canada
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Creole is right. I changed the code as explained and it works. When I copied the code generated from FP2000 I put each tag on a new line for readability. That's what didn't work. I recopied the code into the include, left it alone and it works. tr and td tags are on the same line. I would have never figgered that was the problem. Great call Creole. Post your questions on SitePoint. This is where the answers are.

  9. #9
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <font size="15">BOOYAH!!!</font>

    giggle...teehee...

    Thank you for the compliment Brian...I only speak from LONG experience with tables. You don't how many times I beat my head against the wall the first time I came across the same problem. I design for http://www.booksamillion.com and let me tell you, they use tables like a mofo.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  10. #10
    SitePoint Addict
    Join Date
    Oct 2000
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by creole
    I only speak from LONG experience with tables. You don't how many times I beat my head against the wall the first time I came across the same problem.
    As a fellow long-term veteran of table warfare, creole, I gotta note that there's a point in there.

    Tables can be a royal pain -- but they're also the main means of positional control in HTML. Beginning designers avoid them like the plague... but I'm afraid they're a gotta-gotta learn item, including all their quirks.

  11. #11
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh heck yeah. Tables rule...once you get to the point where you can type them straight out, then you have it made...except for the occasional time where they come and bite you in the butt.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  12. #12
    SitePoint Addict
    Join Date
    Oct 2000
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    True enough... do them long enough, and you can whip 'em off in NotePad, nested ten deep. They may seem a little intimidating at first, but hey, they follow a strict pattern -- it's just a matter of memorizing the basic tags and spending some time whacking away at them in practice exercises.

  13. #13
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You kidding me? Of COURSE it makes sense. I find things all out of whack for reasons just like that. It's fairly rare in IE, but in Netscape I see it constantly. Tables are very weird that way - especially nested tables.

    Anyway, kudos to creole for nailing it.

  14. #14
    SitePoint Addict
    Join Date
    Oct 2000
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One of the other classic quirks with Netscape tables is the mysterious appearance of spaces where -- well, you didn't put any.

    When this one bites you, close up the tail end of the table code, and it'll usually fix it.

    Instead of this...

    <table>
    <tr>
    <td>
    .
    .
    .
    </td>
    </tr>
    </table>

    Do this...

    <table>
    <tr>
    <td>
    .
    .
    .
    </td></tr></table>

    This one's a demon -- and it will come get you -- so write it down somewhere.

    <Edited by etLux on 11-28-2000 at 12:32 AM>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •