4 replies [Last post]
planeboy747
planeboy747's picture
Offline
Enthusiast
Last seen: 8 years 2 weeks ago
Timezone: GMT+7
Joined: 2005-07-17
Posts: 71
Points: 8

I'm trying to add an e-mail subscribe form in the banner of my web site, but it's not rendering right in IE 6. Works fine in NN and FF.

Here's the code I'm using

<div id="bannerSubscribe">Receive Newsletter & Updates<br /><input name="E-mail" type="text" value="E-mail address" /><input name="Subscribe" type="button" value="Subscribe" />
</div>

Here's the CSS I'm using:

#bannerSubscribe{
float: left;
margin: 25px 0 0 150px;
}

You can see where I have the <br /> tag it appears off centered, not sure why that's happening in IE or how to fix?

GatorSr
Offline
Regular
Last seen: 15 years 1 week ago
Timezone: GMT-5
Joined: 2005-08-06
Posts: 42
Points: 0

&lt;input&gt; tag not displaying correctly in IE 6

Hi PB747,

I see nothing out of place in what you presented. In your CSS there is no space before the first curly bracket which may not matter.

Diff subject: On the text, you used an ampersand from the keyboard for the Receive Newsletter & Updates and to be properly coded it should be written as &amp; as in Receive Newsletter &amp; Updates.

GatorSr
Be Nice to Everyone
Read Hebrews 132

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 5 years 43 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Re: &lt;input&gt; tag not displaying correctly in IE 6

planeboy747 wrote:

#bannerSubscribe{
float: left;
margin: 25px 0 0 150px;
}

Is it the <div> or the inputs that are s'posed to float left? It's kinda hard to tell what's wrong without seeing an actual page.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

gleddy
gleddy's picture
Offline
Leader
sydney, australia
Last seen: 12 years 14 weeks ago
sydney, australia
Timezone: GMT+10
Joined: 2004-09-21
Posts: 596
Points: 0

&lt;input&gt; tag not displaying correctly in IE 6

I am going to guess you're trying to do something like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Form test</title>
	
<style type="text/css">
#bannerSubscribe{
float: left;
margin: 25px 0 0 150px;
}
form { margin: 0; }
</style>

</head>

<body>

<div id="bannerSubscribe">Receive Newsletter & Updates
<form>
	<input name="email" id="email" type="text" value="email address" />
	<input name="subscribe" id="subscribe"  type="button" value="subscribe" />
</form>
</div> 

</body>
</html>

but if not then provide a link as it's too much guessing. (hope you had a form tag around those <input>'s in the first place)

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 6 years 23 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

&lt;input&gt; tag not displaying correctly in IE 6

I'm guessing it's the IE double float margin bug.