table-tags within div-tags

Discussion in 'HTML' started by Chris, Feb 9, 2004.

  1. Chris

    Chris Guest

    Hi all,

    I'm having a problem with Internet Explorer (6) and XHTML/CSS. The page layout screws up, when I put a <table> tag within a <div> tag.

    Here is an example of a page with my simple layout and *without* table tags, and how it should look like:
    http://www.barons.de/users/~cck/somepage.html

    And when I put some lines of simple table tags inside the center column, it will look like this:
    http://www.barons.de/users/~cck/withtable.html

    Can someone give me some help on this?
    Thanks in advance!

    Chris
     
    Chris, Feb 9, 2004
    #1
    1. Advertising

  2. Chris

    Chris Guest

    forgot to say:
    in mozilla (firefox 0.8) it looks just fine.


    Chris
     
    Chris, Feb 9, 2004
    #2
    1. Advertising

  3. Chris

    Mark Parnell Guest

    On Tue, 10 Feb 2004 00:44:14 +0100, Chris <>
    declared in alt.html:

    > Hi all,


    G'day.

    >
    > I'm having a problem with Internet Explorer (6) and XHTML/CSS.


    Don't we all?

    > The page layout screws up, when I put a <table> tag within a <div> tag.
    >


    Don't have time to try it at the moment, but try adding
    table {clear: none;}
    to your style sheet.

    BTW: Please adjust your line length in your posts to around 78
    characters. Thanks.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Feb 10, 2004
    #3
  4. Chris wrote:
    > Hi all,
    >
    > I'm having a problem with Internet Explorer (6) and XHTML/CSS. The
    > page layout screws up, when I put a <table> tag within a <div> tag.
    >
    > Here is an example of a page with my simple layout and *without*
    > table tags, and how it should look like:
    > http://www.barons.de/users/~cck/somepage.html
    >
    > And when I put some lines of simple table tags inside the center
    > column, it will look like this:
    > http://www.barons.de/users/~cck/withtable.html
    >
    > Can someone give me some help on this?
    > Thanks in advance!
    >
    > Chris


    line 32 says that the table should be 100% of the width of the page. take
    that away.
     
    Disco Octopus, Feb 10, 2004
    #4
  5. Chris

    Richard Guest

    Chris wrote:

    > Hi all,


    > I'm having a problem with Internet Explorer (6) and XHTML/CSS. The page
    > layout screws up, when I put a <table> tag within a <div> tag.


    > Here is an example of a page with my simple layout and *without* table
    > tags, and how it should look like:
    > http://www.barons.de/users/~cck/somepage.html


    > And when I put some lines of simple table tags inside the center column,
    > it will look like this: http://www.barons.de/users/~cck/withtable.html


    > Can someone give me some help on this?
    > Thanks in advance!


    > Chris


    Most likely because you show width="100%" in the table tag.
    In a style definition set "width:auto;"
    IE doesn't like inner divisions or tables to be 100%.
    If you use the "auto" IE will max it out to the edge of the division.
     
    Richard, Feb 10, 2004
    #5
  6. Chris

    Chris Guest

    Thanks everybody for your advices!

    I inserted the following lines to my CSS and it works just the way I want.

    table.hack {
    width: 98%;
    }
    html>body table.hack {
    width: 100%;
    }


    Chris
     
    Chris, Feb 10, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Noozer

    Block DIV within a block DIV?

    Noozer, Jan 6, 2005, in forum: HTML
    Replies:
    3
    Views:
    11,374
    Mitja
    Jan 6, 2005
  2. Jimmy
    Replies:
    7
    Views:
    4,937
    Chaddy2222
    Nov 21, 2008
  3. K Viltersten

    <div ... /> and <div ...></div>

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    759
  4. Dwayne Madsen

    Q: Div A inside Div B is larger than Div B

    Dwayne Madsen, Jun 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    198
    David Dorward
    Jun 1, 2005
  5. mscir
    Replies:
    3
    Views:
    322
    Martin Honnen
    Jun 26, 2005
Loading...

Share This Page