Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

Curved table corners

5:46 pm on Jul 3, 2010 (gmt 0)

Junior Member from ZA 

5+ Year Member

joined:Sept 19, 2008
votes: 0


Instead of heaving a box like table on a webpage, is it possibe to curve the conners of the table using html or any other language?
1:39 pm on July 4, 2010 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 2, 2003
posts: 970
votes: 23

Hi there phex,

the following code will work in Firefox,Safari and Opera....

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">

<style type="text/css">
body {
#table1 {
border:2px solid #000;
margin:50px auto;
box-shadow: #323 60px 60px 120px;
-moz-box-shadow: #323 60px 60px 120px;
-webkit-box-shadow:#989 30px 30px 60px;
#table1 td {
border:1px solid #000;


<table id="table1"><tr>
<td>table cell</td>


This is CSS3 methodology and your guess is as good as mine as to when it will be implemented by IE.
I would definitely suggest that you do not hold your breath whilst waiting. ;)

5:48 pm on July 4, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
votes: 0

And thereby hangs the rub, flippin' IE . . . .

A typical method to get IE to play nicely is to create a circle image, create a div or cell exactly half the width and height of the circle, then apply the circle as a background image. For the upper left corner, it will fall into place at 0,0, but for the other three corners you tweak the background position up, down, left and right to allow the appropriate corner to show. This works with table cells or semantic elements (<div>, <p>, etc.) For the horizontal and vertical borders, you can sometimes use the border properties, but most often have to use a background image there, comprised of a single pixel, positioned top, left, right, and bottom, repeating x and y accordingly.

An example CSS, HTML is two nested divs with a top and bottom row inside the inner one, each containing the actual corner divs:

#border-top-row,#border-bottom-row {
height: 12px;
float: left;
width: 100%;
background:url(/images/black-pixel.gif) repeat-x;
#border-top-row { background-position: top; }
#border-bottom-row { background-position: bottom; }
#border-outer, #border-inner {
float: left;
width: 100%;
background:url(/images/black-pixel.gif) repeat-y;
padding: 0;
#border-outer { background-position: left; }
#border-inner { background-position: right; }
#tl, #tr, #bl, #br {
height: 12px;
width: 12px;
font-size: 2px;
#tl { float: left; background-position: 0 0; }
#tr { float: right; background-position: 12px 0; }
#bl { float: left; background-position: 0 -12px; }
#br { float: right; background-position: -12px -12px; }
2:15 pm on July 21, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Mar 12, 2010
votes: 0

For a lighter code I use an image the width of my div with the 2 corners rounded

Example: [subiadrafts.com ]

and then I use the following code:

<div class="whateveryouwanttonameit"></div>

.whateveryouwanttonameit {
background-image: url(image.gif);
background-repeat: no-repeat;
float: left;

You can flip the image and adjust the code depending on where you want to have the corners.

You can use js but I perfer not to