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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Coding an html email

Status
Not open for further replies.

NIA2

Technical User
Aug 30, 2006
137
AU
Hi everyone,

I'm currently coding a promotional html email to send out to opt-in clients. I'm using a table layout and inline css so it will be compatible with the most number of email clients.

I have a few paragraphs but have found that it's adding too much space between the p tags. I thought about setting the margin via css but just found out that hotmail doesn't support this, so at the moment I've just placed the whole block of text in between two p tags and then inserted line breaks where needed. This doesn't work though because now there's no space at all between the paragraphs. Since it seems I can't use css to enforce a custom amount of space between the paras and have it work across all email clients, is there another way to do this with plain html?

Appreciate any support.
 
You can try putting you <style> tags in the <body> of the page rather than the <head>

It's invalid, but I think (from my rusty memory) it works within Hotmail and other mail clients.

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.
 
Thanks everyone for the input. I've ended up reducing the line-height and using two break tags as suggested.

I've also read an article in the css-discuss wiki on the StyleInEmail page at:


Just wondered if anyone's read it? The author is recommending the use of embedded css, inline styles and old font tags. I can't understand the reason for so much code - I mean since support for the different types of css, whether it be inline or embedded, vary wildly among the different email readers, I was just questioning the usefulness in writing both html and css code in the one email. I could be wrong and may have misunderstood the reasoning behind recommending using both but it seems to me to be a double up of code. I just thought since most email readers are more likely to understand html, and only some understand css, wouldn’t it be a lot less verbose to use html only so that we’re limiting the amount of code written and all email clients, whether it be web based or desktop, would understand it anyway?

Just wondered if anyone's read this, could they comment on it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top