Table breaking out of div

Discussion in 'HTML' started by Bruno, Oct 18, 2003.

  1. Bruno

    Bruno Guest

    Hi,

    I have a table inside a div elememt which breaks out of the space which the
    element uses. The paragraph of text stays within the boudaries specified but
    not the table. For some reason the table starts at the right place on the
    left but then extends well beyond the viewport on the right. Here is the
    code

    <style type="text/css">
    ..main {padding: 10px;
    border: 0px;
    background:#FFFFCC;
    margin: 0px 190px 0px 190px;}
    </style>

    <div id="main">
    <p>Lots of text which wraps fine</p>
    <table style="width: 100%"><tr><td></td><tr></table>
    </div>

    Any ideas?
    Bruno, Oct 18, 2003
    #1
    1. Advertising

  2. Bruno

    brucie Guest

    In post <Vo7kb.4592$>
    Bruno said...

    > The paragraph of text stays within the boudaries specified but
    > not the table.
    >
    > <style type="text/css">
    > .main {padding: 10px;

    ^^^ class

    > <div id="main">

    ^^^ ID



    --
    brucie.
    18/October/2003 07:29:24 pm
    brucie, Oct 18, 2003
    #2
    1. Advertising

  3. Bruno

    rf Guest

    "brucie" <> wrote in message
    news:bmr127$pnq3n$-berlin.de...
    > In post <Vo7kb.4592$>
    > Bruno said...
    >
    > > The paragraph of text stays within the boudaries specified but
    > > not the table.
    > >
    > > <style type="text/css">
    > > .main {padding: 10px;

    > ^^^ class
    >
    > > <div id="main">

    > ^^^ ID


    Or more generically <shout>TURN ON BORDERS FOR EVERYTHING</shout>. That way
    you know where all your elements are, what shape they are and which othere
    elements the live in them and which style rules affect each 'selected'
    element. If still in doubt change the border colour for certain elements so
    you can see them individually.

    Cheers
    Richard.
    rf, Oct 18, 2003
    #3
  4. Bruno

    brucie Guest

    In post <Qxakb.156102$>
    rf said...

    > Or more generically <shout>TURN ON BORDERS FOR EVERYTHING</shout>.


    it turns me on when you get strong and forceful.


    --
    brucie.
    18/October/2003 11:09:37 pm
    brucie, Oct 18, 2003
    #4
  5. "brucie" <> wrote in message
    news:bmre11$ptli4$-berlin.de...
    > In post <Qxakb.156102$>
    > rf said...
    >
    > > Or more generically <shout>TURN ON BORDERS FOR EVERYTHING</shout>.

    >
    > it turns me on when you get strong and forceful.


    Flog me
    Woolly Mittens, Oct 18, 2003
    #5
  6. Bruno

    Bruno Guest

    "rf" <> wrote in message
    news:Qxakb.156102$...
    >
    > "brucie" <> wrote in message
    > news:bmr127$pnq3n$-berlin.de...
    > > In post <Vo7kb.4592$>
    > > Bruno said...
    > >
    > > > The paragraph of text stays within the boudaries specified but
    > > > not the table.
    > > >
    > > > <style type="text/css">
    > > > .main {padding: 10px;

    > > ^^^ class
    > >


    This was just a typo when copying over the markup it does say #main on the
    page.

    > > > <div id="main">

    > > ^^^ ID

    >
    > Or more generically <shout>TURN ON BORDERS FOR EVERYTHING</shout>. That

    way
    > you know where all your elements are, what shape they are and which othere
    > elements the live in them and which style rules affect each 'selected'
    > element. If still in doubt change the border colour for certain elements

    so
    > you can see them individually.
    >


    I've turned on all the borders on and put the site live so you can see it at
    www.midlands-directory.co.uk/registration.php

    Any ideas?
    Bruno, Oct 19, 2003
    #6
  7. Bruno

    brucie Guest

    brucie, Oct 19, 2003
    #7
  8. Bruno

    Bruno Guest

    "brucie" <> wrote in message
    news:bmts0b$qock8$-berlin.de...
    > In post <7cukb.6751$>
    > Bruno said...
    >
    > > I've turned on all the borders on and put the site live so you can see

    it at
    > > http://www.midlands-directory.co.uk/registration.php
    > > Any ideas?

    >
    > fix your errors and see what happens:
    >

    http://validator.w3.org/check?uri=http://www.midlands-directory.co.uk/registration.php
    >

    http://jigsaw.w3.org/css-validator/...irectory.co.uk/fpp.css&warning=1&profile=css2
    > --
    > brucie.
    > 19/October/2003 09:18:23 pm


    Aha that now works. The issue is with those blasted adverts. Their markup is
    riddled with rubbish. As soon as I removed all the adverts it works fine.
    That is a royal pain because the client is going to be adding and removing
    those things all the time.

    See http://www.midlands-directory.co.uk/registration_test.php
    Bruno, Oct 19, 2003
    #8
    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. Amy
    Replies:
    0
    Views:
    501
  2. Jimmy
    Replies:
    7
    Views:
    4,915
    Chaddy2222
    Nov 21, 2008
  3. K Viltersten

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

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    738
  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:
    182
    David Dorward
    Jun 1, 2005
  5. mscir
    Replies:
    3
    Views:
    303
    Martin Honnen
    Jun 26, 2005
Loading...

Share This Page