SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member fitzy75's Avatar
    Join Date
    Mar 2006
    Location
    Horsham, West Sussex, United Kingdom
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Table not displaying correctly in IE, works fine in Firefox

    Hi

    I've searched the forums and Google but I can't seem to find anything that works so far so I thought I would post on here (apologies if I have overlooked another thread which may solve my problem).

    I know it's probably not best practice to use tables for laying out the page but at the moment I'm not confident enough with CSS to use that.

    The problem I'm having is that I've got a table with the width set to 100% so that whatever the screen resolution/window size it will always expand to fill the browser. I've got a column on the left for the menu set to 150px which I would like to stay that fixed size if possible. This works fine in Firefox 2 but I've noticed that in IE 6 and 7 it seems to treat the column width as a percentage or something like that as when I resize the window, the column width changes.

    The link to the page is:
    http://rwweb.robweb.info/justin/site

    (Ignore the empty iframe, I'm working on some content to go in there.)

    Edit: When I get round to it I will take the CSS out of the page and put it in a seperate css file to tidy things up a bit but at the moment I found it easier to have it in there to see exactly what's happening and where

    Does anyone know how I can get it to display properly in IE?

    Many thanks.
    Rob.
    Last edited by fitzy75; Jun 2, 2008 at 14:01. Reason: Adding more info

  2. #2
    @alexstanford Alex's Avatar
    Join Date
    Apr 2004
    Location
    Jacksonville, Florida
    Posts
    757
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The only thing I can recommend is you look into learning CSS, it would help you in these situations.
    Alex Stanford @alexstanford tumblog about.me in fb G+ K
    TechTalkin The Premier Community for Technology Enthusiasts and Professionals
    Full Ambit Media Zero Sacrifice Web Design & Development; Made in the USA @fullambit in fb G+ K

  3. #3
    SitePoint Wizard Blake Tallos's Avatar
    Join Date
    Jun 2008
    Location
    Cuyahoga Falls, Ohio.
    Posts
    1,510
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Eww dont use iframes Use Html & CSS. Html is the structure of the web page and Css is The styling of the webpage.

    Check out some of these Sites and they can Get You what You want.
    http://www.pmob.co.uk/index.htm
    http://layouts.ironmyers.com/
    http://www.smashingmagazine.com/2007...and-templates/
    Blake Tallos - Software Engineer for Sanctuary
    Software Studio, Inc. C# - Fanatic!
    http://www.sancsoft.com/


  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all, width="150px" is not correct. The width attribute takes a number (interpreted as pixels) or a percentage. Thus it should be width="150", without the 'px'.

    Secondly, widths specified for table cells are only hints (minimum widths) as long as you use the automatic table layout algorithm, which is the default. Cells adapt to their content. You can get a better result with the fixed table layout algorithm, but that can only be achieved with CSS (table-layout:fixed), in which case you'd be much better off ditching the layout tables anyway.
    Birnam wood is come to Dunsinane


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
  •