Creating a CSS equivalent

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Creating a CSS equivalent

    Hello.

    I'm currently creating a website, and in the process trying to be more W3C
    friendly by using xhtml and css.

    My problem is I have a table and as part of the design, boxes appear with the
    corners rounded off. So the table (not using CSS) had to have at least 9 cells
    to create the above effect, as shown below (or see the HTML further down)...

    Top-left Cell | topleft corner image Top-middle Cell | Top
    border Top-right Cell | topright corner image

    Centre-left Cell | Left border Centre-middle Cell |
    CONTENT Centre-right Cell | Right border

    Bottom-left Cell | botleft corner image Bottom-middle | Bottom border
    Bottom-right | botright corner img


    <table cellpadding="0" cellspacing="0" border="0">
    <tr>
    <td><img src="images/grey-corner-tl.gif" width="17" height="17" border="0"
    alt="" /></td>
    <td class="top"><img src="images/spacer.gif" width="17" height="17"
    border="0" alt="" /></td>
    <td><img src="images/grey-corner-tr.gif" width="17" height="17" border="0"
    alt="" /></td>
    </tr>

    <tr>
    <td class="left"><img src="images/spacer.gif" width="17" height="17"
    border="0" alt="" /></td>
    <td width="761">Content</td>
    <td class="right"><img src="images/spacer.gif" width="17" height="17"
    border="0" alt="" /></td>
    </tr>
    <tr>
    <td><img src="images/grey-corner-bl.gif" width="17" height="17" border="0"
    alt="" /></td>
    <td class="bottom"><img src="images/spacer.gif" width="17" height="17"
    border="0" alt="" /></td>
    <td><img src="images/grey-corner-br.gif" width="17" height="17" border="0"
    alt="" /></td>
    </tr>
    </table>

    Is there any way of reproducing this using css without a table, or a least
    simplifying it a bit to lose some of the spacer gifs?

    Any help would be greatly appreciated.

    Many thanks for your time.
    Meeesta

    meeesta Guest

  2. Similar Questions and Discussions

    1. PHP equivalent to MOD
      Hi, I need to see if a number is divisible by 2. I don't see the math function "mod" in my PHP Functions reference manual. Is there another way...
    2. php equivalent of CGI.pm
      I'm translating several old cgi scripts (that use CGI.pm) to php. CGI.pm has a series of conventient function calls for generating HTML code on the...
    3. Is there %TYPE equivalent?
      Hi, I'm dealing with migrating Oracle PL/SQL procedures to DB2 UDB 8.1. Oracle uses %TYPE attribute to dynamically get column type. Is there a db2...
    4. Equivalent to DirectX for MAC
      Hi, Could anyone tell me what sort of drivers for MAC OS9 and 10would be equivalent to DirectX for fster 3D rendering on a MAC. I know OpenGL is...
    5. ACT! Equivalent for Mac?
      Does anyone know if there is a Macintosh program whose features are roughly equivalent? This PC software runs on VPC, but is fairly sluggish....
  3. #2

    Default Re: Creating a CSS equivalent

    I'd forget the rounded corners - work with the medium, not against it. But
    if you must keep them, just position the corner images using CSS, forget the
    spacers and tables and stuff. Do your layout using div tags.



    meeesta wrote:
    > Hello.
    >
    > I'm currently creating a website, and in the process trying to be
    > more W3C friendly by using xhtml and css.
    >
    > My problem is I have a table and as part of the design, boxes appear
    > with the corners rounded off. So the table (not using CSS) had to
    > have at least 9 cells to create the above effect, as shown below (or
    > see the HTML further down)...
    >
    > Top-left Cell | topleft corner image Top-middle Cell
    > | Top border Top-right Cell | topright corner image
    >
    > Centre-left Cell | Left border Centre-middle
    > Cell | CONTENT Centre-right Cell | Right border
    >
    > Bottom-left Cell | botleft corner image Bottom-middle |
    > Bottom border Bottom-right | botright corner img
    >
    >
    > <table cellpadding="0" cellspacing="0" border="0">
    > <tr>
    > <td><img src="images/grey-corner-tl.gif" width="17" height="17"
    > border="0" alt="" /></td>
    > <td class="top"><img src="images/spacer.gif" width="17" height="17"
    > border="0" alt="" /></td>
    > <td><img src="images/grey-corner-tr.gif" width="17" height="17"
    > border="0" alt="" /></td>
    > </tr>
    >
    > <tr>
    > <td class="left"><img src="images/spacer.gif" width="17"
    > height="17" border="0" alt="" /></td>
    > <td width="761">Content</td>
    > <td class="right"><img src="images/spacer.gif" width="17"
    > height="17" border="0" alt="" /></td>
    > </tr>
    > <tr>
    > <td><img src="images/grey-corner-bl.gif" width="17" height="17"
    > border="0" alt="" /></td>
    > <td class="bottom"><img src="images/spacer.gif" width="17"
    > height="17" border="0" alt="" /></td>
    > <td><img src="images/grey-corner-br.gif" width="17" height="17"
    > border="0" alt="" /></td>
    > </tr>
    > </table>
    >
    > Is there any way of reproducing this using css without a table, or a
    > least simplifying it a bit to lose some of the spacer gifs?
    >
    > Any help would be greatly appreciated.
    >
    > Many thanks for your time.
    > Meeesta

    rob::digitalburn Guest

  4. #3

    Default Re: Creating a CSS equivalent

    The easiest way to do that in CSS would be to create a layer using the
    &lt;div&gt; tag and then position the graphics so they float to the left and
    right of your content. Something like this: CSS #body { put your
    defs in here } #topleft { float: left; padding: 0px; margin: 0px; }
    #topright { float: right; padding: 0px; margin: 0px; } &lt;div
    id=&quot;body&quot;&gt; &lt;img src=&quot;filename.gif&quot;
    alt=&quot;&quot; id=&quot;topleft&quot; /&gt; &lt;img
    src=&quot;filename.gif&quot; alt=&quot;&quot; id=&quot;topright&quot; /&gt;
    &lt;/div&gt; you can do that for all the different corner graphics you have.
    Should work. BJ

    bsnyder2004 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139