Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rounded table edges

Status
Not open for further replies.

monkeymeister

Programmer
Mar 17, 2005
58
GB
I have created 4 images for each corner of my table to make the table look like it has rounded edges. But when I add the images to my HTML I get a border around them. Does anybody know how to get rid of this?


Thanks,

Mike
 
Yes - use CSS, either in your HEAD section:

Code:
<style type="text/css">
img {
   border: none;
}
</style>

or inline:

Code:
<img ... style="border:none;" />

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Hmm... That is assuming, of course, that it is a border you are seeing, and not cell padding or cell spacing. If either of those are the case, you'd need to set them to "0" in your table definition.

Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I still get the same problem. Here is my code :

<table width="550" bgcolor="blue" border="0">
<tr>
<td width="100"><img src="images/header1.jpg" Width="100" Height="10" style="border:none;"></td>
<td width="150"></td>
<td width="50"></td>
<td width="100"></td>
<td width="150"><img src="images/header2.jpg" Width="158" Height="10" style="border:none;"></td>
</tr>
<tr>
<td align="right" width="100" class="main">Company Key</td>
<td align="left" width="150"><asp:textbox id="txtCompanyKey" runat="server" Font-Name="verdana"></asp:textbox></td>
<td width="50"></td>
<td align="right" width="100" class="main">Company Name</td>
<td align="left" width="150"><asp:textbox id="txtCompanyName" runat="server" Font-Name="verdana"></asp:textbox></td>
</tr>
</table>


Thanks,

Mike
 
Thanks Dan,

I would've thought that the default for cellpadding and cellspacing would be 0 anyway, that's why I didn't try setting them to 0.


Mike
 
The easy way to tell is to turn your table borders on... some browser defaults differ from others, too - and not just for table padding, but body margins, and other bits and pieces. If in doubt, always set them explicitly.

Good to see you got it sorted in the end!

Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top