Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Every time I setup a custom email and use the slightest bit of HTML within the email, there's a block (for lack of a better term) of dead space at the top of the email. I can't seem to get rid of it. I've tried different things, but I'm at the end of my rope with my skillset. Does anyone know how to fix this?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Make sure you have no white space between your tags when you add/refrence it in SPD, should be one nice long string. i.e. <table><tr><td><p><span></span></p></td></tr></table><etc...>

Try encapsulating your content into a table or div and setting margin to 0 and/or adding a negative for the top margin.


Ben McCormack has an Access Form that can generate the code for you. http://unitedsupplyco.sharepointsite.net/publicfacing/bensblog/Lists/Posts/Post.aspx?ID=49

If you just look at the examples you will how the code is not 'formatted' in a clear readable way (no line breaks, indents, etc). This is how the email template needs to be.

I would also strip out all your CSS code and see if the layout is working without that, then start adding back your CSS and you'll find what's causing your problem.

Not sure how much more I can give you without seeing a pic of your 'white space' problem and the actual code you are using.

share|improve this answer
    
Just to give you an update, I added this bit of code to my container: <div cellspacing="0" border="0" cellpadding="0" width="100%" style="position:absolute;top:0px"> and I'm experiencing the same result. Is this what you were talking about? –  iOnline247 May 3 '10 at 20:42
    
I've tried this too and it doesn't work: <div cellspacing="0" border="0" cellpadding="0" width="100%" style="position:absolute;top:-50px"> I get the same results... –  iOnline247 May 4 '10 at 12:46
    
I have also tried this: <div cellspacing="0" border="0" cellpadding="0" width="100%" style="position:absolute; margin-top:-50px"> <div border="0" width="100%" style="position:absolute; margin-top:-50px"> and I've had no luck whatsoever... Any more tips? –  iOnline247 May 4 '10 at 12:58
    
Can you drop a screen shot of the email showing the "white space" and post the code you are using for the email template? –  Jesus Shelby May 5 '10 at 16:08
1  
OMG!!! You were spot on. I coded it in Notepad++ b/c it's easy to read and I love hitting return and tabbing. Didn't know that was a bad thing for SPD. It looks fantastic now and you deserve credit for the answer. Thank you very much! You just made my week!!! ;-) Cheers, Matt –  iOnline247 May 6 '10 at 15:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.