Click to See Complete Forum and Search --> : Can someone look at my source code (CSS problem)


Rabbitsfoot
08-12-2005, 09:36 AM
Hi,

Can someone take a look at my source code. I am attempting to create an HTML based email newsletter for my client. It works fine from the URL, but when I email it, I loose all of the formatting.

I'm fairly new at CSS so I'm sure this is the problem.

Thanks

Pat

http://www.daymarksi.com/newsletter

silverbullet24
08-12-2005, 01:13 PM
you loose all the formatting? did you try a valid doctype as the first line? my email sending program does that by default

Rabbitsfoot
08-15-2005, 07:25 AM
I loose the formatting that I have used pre-defined styles on. In the head, I have created body and paragraph styles that I am using to format the text later in the document.

I don't know how to specify the doc type when I'm sending through e-mail, can you clarify?

Thanks

Rabbitsfoot
08-15-2005, 07:38 AM
Oh, do you mean selecting HTML in the format drop down when sending? If so, my email does that for me.

silverbullet24
08-15-2005, 10:21 AM
not necessarily. my email program has 3 options, plain text, html, external html. the html option is a GUI editor for an html email. the external option allows me to paste in code that i've created already. the first line in that mode is always a doctype. its the very first line in your code and usually looks something like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Are you editing the code in your email program or using a WYSIWYG editor?

Rabbitsfoot
08-31-2005, 07:41 AM
I am using Front page to create the code.

Thanks.

the tree
08-31-2005, 08:16 AM
I am using Front page to create the code.That'd be your problem, the code is horrific.

Rabbitsfoot
09-01-2005, 04:41 PM
Thanks Silverbullet,

I added the doctype and ran it through W3 markup validation for 4.01 transitional, cleaned up all the bad stuff and it works fine now!

The Tree, I'm not sure if you're insulting me or front page for the horrific code? ;)
I'm doing my best to learn how to code better and that's why I'm asking for assistance.

Thanks

LJK
09-01-2005, 05:22 PM
Hi -
Trust me, the insult is for Front Page.
It's a really awful hand to hold for walking you through the learning process...

El

anandg
09-07-2005, 05:24 PM
It doesn't work because you put the CSS in the HEAD. When you send a HTML Email to webmail clients like Gmail, Hotmail, etc., than everything in the HEAD-tags and BODY tags are ignored or removed. Also the doctype you enter is ignored or removed.

So you have to use inline styles instead of embedded styles.
Have a look at Create compatible HTML Email (http://www.anandgraves.com/redirect/htmlemail.html) .

I have also written a HTML Email Validator (http://www.anandgraves.com/html-email-validator/) . Copy and paste your HTML into the validator and it will report the errors in your code. Each error has a link that referers to the article Create compatible HTML Email (http://www.anandgraves.com/redirect/htmlemail.html) for more information on the error.