Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    1 pix 'gap' in FF, GC, but not IE

    Hi all,

    I built a web site a few years ago and have recently reworked it but essentially kept what was there before, the changes being mainly to artwork. The structure is controlled entirely by TABLEs, not a DIV in site(!).

    The code is riddled with nested tables but works perfectly in Explorer, and also in Google Chrome and FireFox but with one annoying exception.

    The site is at www.geminiintegratedelectronics.com and you can most easily see the problem if you go to the ESD section. In IE, everything is fine, but in GC and FF you'll see a 1-pix 'gap' above the banner heading. If it were a common problem for the two browsers I would expect to see lots of such gaps as the general structure is pretty consistent throughout the site, but it's only in this one place - but on every page, of course - so I'm assuming it's something in the local markup, but I just can't find it.

    For what it's worth I've got TD lineheight set to zero in the stylesheet - which I find is essential for the two non-IE browsers - and also I've found that if you set the height of the thin strip image immediately below the gap to 6 instead of (correctly) 5 pix, then the gap disappears, but the image then distorts, of course, and doesn't line up with the background strip.

    Thanks in advance for your help.

  • #2
    Regular Coder Common's Avatar
    Join Date
    Jan 2009
    Location
    Glasgow, UK
    Posts
    133
    Thanks
    16
    Thanked 13 Times in 13 Posts
    Let me advise you in the future to code for Firefox/Chrome and then fix it for IE, since it's the one that time and time again cares least about standards, websites are much more likely to function properly.

    Btw, your HTML contains 70 errors according to the validator, which is really a huge amount, so fix those and even if that doesn't fix your problem (which it should) it'll be much easier to work out what will.

    Here's your report: http://validator.w3.org/check?uri=ht...Inline&group=0

    Edit: I think your main problem validation wise is that you've chosen XHTML Strict as the doctype, this is really a very strict standard and I don't see any reason why you'd need to use that. Try HTML 4.01 Transitional, it's much more lenient.

    Furthermore, just of curiosity more than anything - why not use DIVs? That page would be sooooooo much easier to create with divs than with tables. Like, honestly, soooo much easier.
    Last edited by Common; 12-20-2010 at 12:01 PM.

  • Users who have thanked Common for this post:

    benyon24 (12-20-2010)

  • #3
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Very many thanks

    Just goes to show a little knowledge is a dangerous thing. I've not done much Flash before and thought I had to have the stricter Doctype for it. I've used your suggestion and I'm down to four errors, only one of which is really 'genuine'.

    Thanks again.

  • #4
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    As Common suggested, here is sone good reading about table layouts.

  • #5
    New Coder
    Join Date
    Dec 2010
    Posts
    32
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Maybe like me, he does not yet have the knowledge of how to.

  • #6
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Quote Originally Posted by jimmyd View Post
    Maybe like me, he does not yet have the knowledge of how to.
    Better to learn correct coding practices from the beginning. If you have the choice to learn to build pages with tables or divs, both are learning experiences, so why not learn the correct one.
    Last edited by teedoff; 12-20-2010 at 07:36 PM.

  • #7
    New Coder
    Join Date
    Dec 2010
    Posts
    32
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Because I knew nothing of DIVs. I started learning by viewing the source of many websites I had visited on a daily basis, which were built with tables, copying, pasting, and editing the code. When you don't know what you are doing and are just using what other people already had, obviously there isn't much "choice" there.

    Anyway, like you said yourself, both are learning experiences, so why not learn...both. Which is what I intend to do.
    Last edited by jimmyd; 12-20-2010 at 06:54 PM.

  • #8
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    I hope I didnt sound like I was belittling you or anyone. I agree that we all probably learn incorrect practices either from some other examples or even by bad instruction at one point or another.

    I personally think table layouts can be more difficult that div layouts, especially when you get into nested tables and multi column/row joins and the like. The fact that you ARE learning is the exciting part, so keep on going!


  •  

    Posting Permissions

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