/    Sign up×
Community /Pin to ProfileBookmark

Gaps between spans

First time poster ?

First of all allow me to apologize I’m using a program that automatically generates e-mail reminders to be sent out to users and translates all of my HTML to old-school HTML so I realize these things are out of date… which may be part of my problem.

I’ve got the classic problem (which I know I’ve solved a million times before) of having a gap between my header span and my content span in IE. I know to zero out my padding and margins … I think I’ve zeroed out everything possible. Would divs be better possibly?

Screenshot:
[url]http://www.1stinternet.com/emails/sample.jpg[/url]

Code:

[CODE]<STYLE>

body{
background-color: #ccc;
text-align: center;
padding: 0px;
margin: 0px;
}

span#wrapper{
width: 500px;
min-width: 500px;
height: 500px;
background-color #0f0;
margin: 25px auto 0 auto;
text-align: justify;
display: block;
padding: 0px;
position: relative;
}

span#content{
position: absolute;
background-color: #fff;
background-image: url(‘http://www.1stinternet.com/emails/content.jpg’);
background-repeat: repeat-y;
width: 500px;
min-width: 500px;
display: block;
padding: 0px;
margin: 0px;
top: 80px;

}
span#header{
position: relative;
width: 500px;
display: block;
padding: 0px;
margin: 0px;
}

span#footer{
background-image: url(‘http://www.1stinternet.com/emails/wellbottom.jpg’)
background-repeat: no-repeat;
position: relative;
width: 500px;
display: block;
padding: 0px;
margin: 0px;
}
p{
padding-left: 10px;
padding-right: 10px;
font-family: verdana, arial, sans-serif;
}
h1{
padding-left: 10px;
padding-right: 10px;
font-family: verdana, arial, sans-serif;
font-size: 11pt;
line-height: 15pt;
}
p#center{
text-align: center;
}

p#right{
text-align: right;
}

img{
padding: 0px;
margin: 0px;
border: 0px;
}

</STYLE>
<SPAN id=wrapper>
<SPAN id=header>
<A href=”http://www.wellnetix.com”><IMG alt=Wellnetix src=”http://www.1stinternet.com/emails/wellheader.jpg” target=”_blank”></A> </IMG></SPAN>
<SPAN id=content>
<H1>We have received your order for the following item(s);</H1>
<P>##note##
<TABLE id=AutoNumber1 style=”BORDER-COLLAPSE: collapse” borderColor=#111111 cellSpacing=0 cellPadding=4 border=1>
<TBODY>
<TR>
<TD width=”100%”>##order_items##<BR>##order_items_summary##</TD></TR></TBODY></TABLE>
<P>
<P></P>
<P>To be sent to:<BR>##order_ship_address##</P>
<P>Thank you for your order!<BR>##company_name##<BR>##company_address##<BR>##company_email##<BR>##company_url##</P><BR></SPAN>
<SPAN id=footer><img src=”http://www.1stinternet.com/emails/wellbottom.jpg”></img></SPAN>
</SPAN>[/CODE]

to post a comment
CSS

9 Comments(s)

Copy linkTweet thisAlerts:
@MorganAauthorJan 26.2009 — Yeah, nevermind I figured it out.
Copy linkTweet thisAlerts:
@anna55Jan 26.2009 — Yeah, nevermind I figured it out.[/QUOTE]

But why will you keep it as your secret?
Copy linkTweet thisAlerts:
@MorganAauthorJan 26.2009 — I used an absolute position one of my spans ? Probably not the best solution.
Copy linkTweet thisAlerts:
@anna55Jan 26.2009 — I used an absolute position one of my spans ? Probably not the best solution.[/QUOTE]

Yes, without that position and a
[code=php]margin-top: -10px; [/code]
instead of the top element would do it.
Copy linkTweet thisAlerts:
@MorganAauthorJan 27.2009 — Ahh, a negative margin! Nice!
Copy linkTweet thisAlerts:
@anna55Jan 27.2009 — Ahh, a negative margin! Nice![/QUOTE]

You like it?! ?

But there are more good news for you: no position with span#content as I said and add here
[CODE]img{
padding: 0px;
margin: 0px;
border: 0px;
[COLOR="Red"]display: block;[/COLOR]
}
[/CODE]


and give H1 layout:
[CODE]H1 {
margin:0;
padding:10px;
}[/CODE]


Hope you will not miss the gap.
Copy linkTweet thisAlerts:
@MorganAauthorFeb 02.2009 — My css does not validate with negative margins... ? Is this standard css?
Copy linkTweet thisAlerts:
@anna55Feb 02.2009 — Yes negative margin ist standard css. But I gave you a second example in post 7 without negative margins.

Here you see a nevative margin example that validates.

I don't know what markup you tried to validate. The one from your first post got some not standard code in. So certainly it would fail validation.
Copy linkTweet thisAlerts:
@MorganAauthorFeb 02.2009 — Well, I was trying my new trick on another document .. looks like its a doc type problem then.
×

Success!

Help @MorganA spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...