Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
meeesta #1
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
-
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... -
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... -
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... -
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... -
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.... -
rob::digitalburn #2
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
-
bsnyder2004 #3
Re: Creating a CSS equivalent
The easiest way to do that in CSS would be to create a layer using the
<div> 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; } <div
id="body"> <img src="filename.gif"
alt="" id="topleft" /> <img
src="filename.gif" alt="" id="topright" />
</div> you can do that for all the different corner graphics you have.
Should work. BJ
bsnyder2004 Guest



Reply With Quote

