Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-22-2012, 03:29 PM   PM User | #1
DejavuPoison
New to the CF scene

 
Join Date: Mar 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
DejavuPoison is an unknown quantity at this point
Question CSS table border extending over set width in HTML Email

I am creating an HTML email and would like rounded corners. These don’t seem to appear in emails or even in IE (even with the –ms-border-radius applied)….

I decided to use images for the top and bottom of the email to get the results I was looking for.

Everything seems to show okay, except for the middle section, which is not an image. This section throws the right border off to the right a few pixels ONLY in the email version. This happens no matter what is in the middle table (I took all the code out and just put "..." in to show the problem) It shows up correctly when viewed in a browser.

An image as appears in outlook: http://i79.photobucket.com/albums/j1...5/throwoff.jpg

Code:
<!--TOP ROUNDED CORNER IMAGE-->
<table border="0" cellspacing="0" cellpadding="0" width="650" style="background-image:url(../images/round1.png);width:650px;height:21px;" valign="top"><tr><td width="650" height="21">
    <!--[if gte mso 9]>
    <v:image xmlns:v="urn:schemas-microsoft-com:vml" style='behavior:url(#default#VML);display:inline-block;width:650px;height:21px;position:absolute;top:0;left:0;border:0;z-index:-1;' src="../images/round1.png" />
    <![endif]-->
</td></tr></table>

<!-- MIDDLE SECTION WITH REAL BORDERS-->
<table border="0" cellspacing="0" cellpadding="0" width="650" bgcolor="#ffffff" style="color: #797979; text-decoration: none; border-right: 2px solid #c8c8c8; border-left: 2px solid #c8c8c8; background-color: #ffffff; z-index: 100;">
<tr><td width="27" colspan="2">...<br /></td>
<td width="596" valign="top"></td>
<td width="27" colspan="2"><br /></td></tr></table>


<!--BOTTOM ROUNDED CORNER IMAGE-->
<table border="0" cellspacing="0" cellpadding="0" width="650" style="background-image:url(../images/round2.png);width:650px;height:21px;" valign="top"><tr><td width="650" height="21">
<!--[if gte mso 9]>
    <v:image xmlns:v="urn:schemas-microsoft-com:vml" style='behavior:url(#default#VML);display:inline-block;width:650px;height:21px;position:absolute;top:0;left:0;border:0;z-index:-1;' src="../images/round2.png" />
<![endif]-->
</td></tr></table>

Thanks for any help!
DejavuPoison is offline   Reply With Quote
Old 03-22-2012, 06:37 PM   PM User | #2
DejavuPoison
New to the CF scene

 
Join Date: Mar 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
DejavuPoison is an unknown quantity at this point
Removed "width=650" on the table and that fixed it.
DejavuPoison is offline   Reply With Quote
Old 03-22-2012, 07:01 PM   PM User | #3
achira
New Coder

 
Join Date: Mar 2012
Location: Somewhere over the Rainbow
Posts: 96
Thanks: 7
Thanked 5 Times in 5 Posts
achira is an unknown quantity at this point
Quote:
Originally Posted by DejavuPoison View Post
I am creating an HTML email and would like rounded corners. These don’t seem to appear in emails or even in IE (even with the –ms-border-radius applied)….

I decided to use images for the top and bottom of the email to get the results I was looking for.

Everything seems to show okay, except for the middle section, which is not an image. This section throws the right border off to the right a few pixels ONLY in the email version. This happens no matter what is in the middle table (I took all the code out and just put "..." in to show the problem) It shows up correctly when viewed in a browser.

An image as appears in outlook: http://i79.photobucket.com/albums/j1...5/throwoff.jpg

Code:
<!--TOP ROUNDED CORNER IMAGE-->
<table border="0" cellspacing="0" cellpadding="0" width="650" style="background-image:url(../images/round1.png);width:650px;height:21px;" valign="top"><tr><td width="650" height="21">
    <!--[if gte mso 9]>
    <v:image xmlns:v="urn:schemas-microsoft-com:vml" style='behavior:url(#default#VML);display:inline-block;width:650px;height:21px;position:absolute;top:0;left:0;border:0;z-index:-1;' src="../images/round1.png" />
    <![endif]-->
</td></tr></table>

<!-- MIDDLE SECTION WITH REAL BORDERS-->
<table border="0" cellspacing="0" cellpadding="0" width="650" bgcolor="#ffffff" style="color: #797979; text-decoration: none; border-right: 2px solid #c8c8c8; border-left: 2px solid #c8c8c8; background-color: #ffffff; z-index: 100;">
<tr><td width="27" colspan="2">...<br /></td>
<td width="596" valign="top"></td>
<td width="27" colspan="2"><br /></td></tr></table>


<!--BOTTOM ROUNDED CORNER IMAGE-->
<table border="0" cellspacing="0" cellpadding="0" width="650" style="background-image:url(../images/round2.png);width:650px;height:21px;" valign="top"><tr><td width="650" height="21">
<!--[if gte mso 9]>
    <v:image xmlns:v="urn:schemas-microsoft-com:vml" style='behavior:url(#default#VML);display:inline-block;width:650px;height:21px;position:absolute;top:0;left:0;border:0;z-index:-1;' src="../images/round2.png" />
<![endif]-->
</td></tr></table>

Thanks for any help!
Have you considered rounding the borders not as an image but just in the css property?

Code:
.nameoftextcontainer
{
border-radius: 10px; (or so, increase/decrease to achieve desired effect)
}

should do it I think.
achira is offline   Reply With Quote
Old 03-22-2012, 08:45 PM   PM User | #4
DejavuPoison
New to the CF scene

 
Join Date: Mar 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
DejavuPoison is an unknown quantity at this point
Yes, I normally use CSS properties. The problem is that IE cannot see rounded corners and they don't seem to show up in HTML emails.
DejavuPoison is offline   Reply With Quote
Reply

Bookmarks

Tags
email, extending, rounded corners, table border, width

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:59 AM.


Advertisement
Log in to turn off these ads.