SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Tricky table mess thats over my head?

    Hello ,

    Here is the page with the problem... http://tinyurl.com/ykawpfa

    This has been nagging me for years, so I thought I'd finally try and fix it. The problem is the 4px black top border (actually it's just a black background on the td's) that wraps the entire container is missing in FX, and Safari. In Opera it's there, but it's about 10px in height. All versions of IE show it perfect! So I'd like them all to look like it does in IE.

    I'm totally-table-tarded, but I believe the problem lies in this code near the top. If you for instance change the width in the first td to 100%, that seems to fix FX but has no effect on Safari or Opera. I tried some things, but I have no idea how tables perform and behave, so I have limited ideas on how to fix it.

    Code:
    <!--top header black-->
    <tr>
       <td CLASS="border" ROWSPAN="4" WIDTH="4" HEIGHT="1">&nbsp;</td>
       <td CLASS="border" WIDTH="100%" height="4" COLSPAN="3" ALIGN="left">&nbsp;</td>
       <td CLASS="border" ROWSPAN="4" WIDTH="4" HEIGHT="1">&nbsp;</td>
    </tr>
    <!--end top header black-->
    As you should see by now, I did not code this, only stuck with it. There are about 150 identical pages like this one that make up this virtual tour. So, I would much prefer to find a pure CSS fix so I don't have to change the source code in all 150 pages. Of course I can probably just use "search and replace" - but I never fully trust that and prefer not to use it on such a large scale. Thanks a lot for any ideas!

  2. #2
    SitePoint Evangelist ferrari_chris's Avatar
    Join Date
    Mar 2008
    Location
    NP, New Zealand
    Posts
    576
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yuck, that's a mess.

    I fixed your issue in Firefox quickly. Don't know if it works in other browsers though.

    I removed that entire top section you've listed above, as it's not necessary. Then, for the table one level down from that (that seems to hold that top nav. section) I gave a new class name then set the border-top: 4px solid black; for that class.

    Hope that helps.

  3. #3
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot ferrari chris that looks like it works perfect in all! Only problem is, there aren't any unique classes or anything in that table, so I don't see a way to do search and replace. So it looks like to fix I'll have to go in to each of 150 pages and make the changes. Any tricky way of doing that in DW that I have not thought of? Either way, thanks bro for the fix. If need be, I'll just bear down and take the 2 hours it will take to do this.

  4. #4
    SitePoint Evangelist ferrari_chris's Avatar
    Join Date
    Mar 2008
    Location
    NP, New Zealand
    Posts
    576
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can search and replace large pieces of text in DW as far as I know, so you could replace the entire "header" section of each file. And you might be able to do a bulk replace (replace all) as well.

    Be sure to make a complete backup though, as it might take a couple of attempts to get the exact HTML in the search and replace boxes! Good luck.

  5. #5
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,837
    Mentioned
    73 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by ferrari_chris View Post
    You can search and replace large pieces of text in DW as far as I know, so you could replace the entire "header" section of each file. And you might be able to do a bulk replace (replace all) as well.

    Be sure to make a complete backup though, as it might take a couple of attempts to get the exact HTML in the search and replace boxes! Good luck.
    If you are going to the trouble of editing about 150 identical sections of code I would be tempted to replace the identical scripts with a common include so that future modifications will only involve changing the common included file.
    PHP Code:
      // If HTML
      <!--#include FILE="my-new-header.htm" -->

      // if PHP
      <?php include "my-new-header.htm" ?>

    .
    Last edited by John_Betong; Feb 1, 2010 at 01:09. Reason: spelling
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Patche on earning Member of the Month for July 2014


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
  •