SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2001
    Location
    rotterdam
    Posts
    130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problems with table layout in IE

    Hi all, I have put together this page, where there is a listing in the top half. I want the 2 columns to be of equal width, which seems to work in Firefox and my version of IE (v7) but not in older versions of IE.

    Would you be able to take a quick look and let me know what I have done wrong? Or does it look ok to you?

    http://www.visordown.com/motorcycle-insurance/

    Thanks in advance.

  2. #2
    SitePoint Wizard bronze trophy DaveWoods's Avatar
    Join Date
    Dec 2004
    Location
    Derbyshire - UK
    Posts
    2,651
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I presume you haven't tried running the site through the W3C validator

    http://validator.w3.org

    I'd also suggest not using tables for your layout though and using CSS much more effectively as you could easily create that page with about 1/10th that amount of code.

    It seems to lineup fine in IE6 for me although to ensure that your columns are equal sizes I'd probably be inclined to put a width on the first cell of each column.

  3. #3
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your HTML is very weird. You have some TD elements using fixed widths and others using percentage widths all in the same table. There are empty rows and columns which just increase page load time. You can accomplish what you're trying to do (two equal columns) with the following:

    HTML Code:
    <table width="50&#37;">
    <tr>
    <td width="50%">Column 1</td>
    <td width="50%">Column 2</td>
    </tr>
    </table>
    Just copy and paste the TR tags (and the HTML inside it) to create a new row.

    As previously mentioned, you should look into CSS layouts because 1) it'll be easier to work manage 2) it'll decrease page load time.

  4. #4
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, I'm REALLY going to try to be 'Mr. Nice" here but OH MY GOD

    1. you have 414 validation errors happening here!

    2. You have over 1000 lines of HTML that could probably be done in under 500 with CSS and tableless code

    Seriously, now ... it's time to look at the standards. Take a step back from what you have 'always done' or 'what you have seen' and look at what 'needs to be done' so everyone can enjoy the same experience' (and I mean non computer users too)

    Moving yourself into the next version of web developers is a giant step for YOU and your website. Code like this is (pardon the expression) is nothing more than web pollution. Push yourself to the next level and make it work for everyone in a neutral fashion (IE: standards compliant code) and you will advance your skills and client base more than you can EVER believe!

    Just to get started how about we do ALL of our HTML tags in lower case (per the rules) ... I think that would eliminate at least 50&#37; of you errors. Then we MIGHT be able to get to the heart of your problems.

    OK, so much for Mr. Nice Guy but seriously ... isn't it time to take your skills to the next level?


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
  •