Inline DIVs Under Netscape/Opera

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adam Siler

    Inline DIVs Under Netscape/Opera

    i want to display a series of inline, fixed-width DIVs that will wrap into
    columns - a table, basically. i can do it under Internet Explorer, but the
    same code under Netscape or Opera does not behave as expected. the DIVs
    "collapse" into small rectangles (i put a border around them so i could
    see), but their contents (some middle-aligned text) span the width of the
    page. if not for the borders that i added, it would appear that each DIV was
    width: 100%. rather than a number of smaller columns, i get one big, fat
    column. what am i doing wrong? here's the code (with only two columns, for
    simplicity):

    <?xml version="1.0" encoding="us-ascii"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="applic ation/xhtml+xml;
    charset=us-ascii" />
    <style type="text/css">
    div.productList ing {
    display: inline;
    width: 128px;
    text-align: center;

    /* temp */
    border: solid 1px red;
    }
    </style>
    </head>
    <body>

    <div class="productL isting">
    <div class="productI mageContainer"> <img class="productI mage" src="#"
    alt="Cufflinks" /></div>
    <div class="productN ame">Gold Cufflinks</div>
    <div class="descript ion">They are cufflinks and they are gold.</div>
    <div class="price">$ 59.90</div>
    </div>

    <div class="productL isting">
    <div class="productI mageContainer"> <img class="productI mage" src="#"
    alt="More Cufflinks" /></div>
    <div class="productN ame">Gold Cufflinks</div>
    <div class="descript ion">These cufflinks are also gold.</div>
    <div class="price">$ 69.90</div>
    </div>

    </body>
    </html>


  • CountScubula

    #2
    Re: Inline DIVs Under Netscape/Opera

    This is a html issue, post in a news group for html


    --
    Mike Bradley
    http://www.gzentools.com -- free online php tools
    "Adam Siler" <asiler@icglp.c om> wrote in message
    news:11XRb.9303 $5I4.3875@fe1.c olumbus.rr.com. ..[color=blue]
    > i want to display a series of inline, fixed-width DIVs that will wrap into
    > columns - a table, basically. i can do it under Internet Explorer, but the
    > same code under Netscape or Opera does not behave as expected. the DIVs
    > "collapse" into small rectangles (i put a border around them so i could
    > see), but their contents (some middle-aligned text) span the width of the
    > page. if not for the borders that i added, it would appear that each DIV[/color]
    was[color=blue]
    > width: 100%. rather than a number of smaller columns, i get one big, fat
    > column. what am i doing wrong? here's the code (with only two columns, for
    > simplicity):
    >
    > <?xml version="1.0" encoding="us-ascii"?>
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    >
    > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
    > <head>
    > <title></title>
    > <meta http-equiv="Content-Type" content="applic ation/xhtml+xml;
    > charset=us-ascii" />
    > <style type="text/css">
    > div.productList ing {
    > display: inline;
    > width: 128px;
    > text-align: center;
    >
    > /* temp */
    > border: solid 1px red;
    > }
    > </style>
    > </head>
    > <body>
    >
    > <div class="productL isting">
    > <div class="productI mageContainer"> <img class="productI mage" src="#"
    > alt="Cufflinks" /></div>
    > <div class="productN ame">Gold Cufflinks</div>
    > <div class="descript ion">They are cufflinks and they are gold.</div>
    > <div class="price">$ 59.90</div>
    > </div>
    >
    > <div class="productL isting">
    > <div class="productI mageContainer"> <img class="productI mage" src="#"
    > alt="More Cufflinks" /></div>
    > <div class="productN ame">Gold Cufflinks</div>
    > <div class="descript ion">These cufflinks are also gold.</div>
    > <div class="price">$ 69.90</div>
    > </div>
    >
    > </body>
    > </html>
    >
    >[/color]


    Comment

    • Pedro Graca

      #3
      Re: Inline DIVs Under Netscape/Opera

      Adam Siler wrote:[color=blue]
      > ... what am i doing wrong? ...[/color]

      you left out the <?php ... ?> tags
      --
      --= my mail box only accepts =--
      --= Content-Type: text/plain =--
      --= Size below 10001 bytes =--

      Comment

      Working...