Jump to content

Border-Radius Conflict


Debbie-Leigh

Recommended Posts

Hi,

 

I'm trying to get top both corners of my table header row to have a rounded corner each, but only one is appearing.

 

The HTML is:

<tr>
<td width="12%" class="tbl-col cnr-tl">Col 1</td>
<td width="20%" class="tbl-col">Col 2</td>
<td width="20%" class="tbl-col">Col 3</td>
<td width="30%" class="tbl-col">Col 4</td>
<td width="12%" class="tbl-col cnr-tr">Col 5</td>
</tr>

 

and the css is:

.tbl-col {
background-color			: #FFDA99;
color						: #C00000;
font-size					: 15px;
font-style					: italic;
font-weight					: bold;
height						: 25px;
text-align					: center;
}
.cnr-tl {
border-top-left-radius				: 10px;
-moz-border-radius-topleft			: 10px;
-webkit-border-top-left-radius		: 10px;
}
.cnr-tr {
border-top-right-radius				: 10px;
-moz-border-radius-topright			: 10px;
-webkit-border-top-right-radius		: 10px;
}

 

When the styles are in this order, the right hand column has a rounded corner, but if you swap the order of .cnr-tl and .cnr-tr, the left hand column has a rounded corner, but I can't get both end columns to have rounded corners at the same time.

 

Putting both corner styles on one column does work, though, but I'd like to have both end columns to have rounded corners and the middle columns to have straight corners.

 

Does anyone know how to do this?

 

Debbie

 

Link to comment
Share on other sites

It shows up fine here. (firefox 4 )MAybe try out my testing file.

Note though i added table tags and since you use width as attribute i also added a transitional doctype.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />       
        <link type="text/css" rel="stylesheet" href="css/style.css" />
        <title></title>
<style type="text/css">
  .tbl-col {
background-color			: #FFDA99;
color						: #C00000;
font-size					: 15px;
font-style					: italic;
font-weight					: bold;
height						: 25px;
text-align					: center;
}
.cnr-tl {
border-top-left-radius				: 10px;
-moz-border-radius-topleft			: 10px;
-webkit-border-top-left-radius		: 10px;
}
.cnr-tr {
border-top-right-radius				: 10px;
-moz-border-radius-topright			: 10px;
-webkit-border-top-right-radius		: 10px;
}
</style>
    </head>
    <body>
        <table>
            <tr>
<td width="12%" class="tbl-col cnr-tl">Col 1</td>
<td width="20%" class="tbl-col">Col 2</td>
<td width="20%" class="tbl-col">Col 3</td>
<td width="30%" class="tbl-col">Col 4</td>
<td width="12%" class="tbl-col cnr-tr">Col 5</td>
            </tr>
        </table>
    </body>
</html>

 

Give it a try

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.