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

Why does this work great in IE but not Firefox?

Status
Not open for further replies.

tcspine

IS-IT--Management
Jan 2, 2008
31
US
<head>
<style type="text/css">
body { background color: 003366; table-layout: automatic }
p { color:668844; font-size:125%; border-top:medium solid #004488; border-bottom:medium solid #004488;
text-align:center }
#Myoutercontainer { position:relative }
#myinnercontainer { position:absolute; top:50%; height:10em; margin-top:-5em }
</style>
</head>

<body>

<div id="myoutercontainer">
<div id="myinnercontainer">
<div style=text-align:center>
<img src=</div>
<p>By using this service you accept that we cannot provide technical support and are
not responsible for computer related problems associated with its use
</p>
<div style=text-align:center>
<FORM>
<INPUT TYPE="BUTTON" VALUE="I Accept" ONCLICK="window.location.href='</FORM>
</div>
</div>
</div>

</body>
 
Is it wrapped in <html> tags and does it have a complete doctype?





Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
I'm guessing you do not because
Code:
background color: 003366

and

p { color:668844;

only run in IE 6 in quirks mode.

When you include a doctype and the html tags, you need correctly formed css, like
Code:
background[COLOR=red]-color: #[/color]003366

and 
p { color: [COLOR=red]#[/color]668844;






Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
Thank you for replying.

It was not enclosed with the <html> tag, but now is.
I also included # before the two numeric values.
It's still working in IE, but still completely unreadable in Firefox.

Here's my updated code.

<html xmlns="<head>
<style type="text/css">
body { background color:#003366; table-layout: automatic }
p { color:#668844; font-size:125%; border-top:medium solid #004488; border-bottom:medium solid #004488;
text-align:center }
#Myoutercontainer { position:relative }
#myinnercontainer { position:absolute; top:50%; height:10em; margin-top:-5em }
</style>
</head>

<body>

<div id="myoutercontainer">
<div id="myinnercontainer">
<div style=text-align:center>
<img src=</div>
<p>By using this service you accept that Twin Cities Spine Center cannot provide technical support and is
not responsible for computer related problems associated with its use</main>
</p>
<div style=text-align:center>
<FORM>
<INPUT TYPE="BUTTON" VALUE="I Accept" ONCLICK="window.location.href='</FORM>
</div>
</div>
</div>

</body>
</html>
 
It's been awhile since I've done any of this. Thank you for re-iterating. Now everything is working except for the background color in Firefox. It's working in IE though. <main> was from an old CSS line I took out, It's removed now.
Here's my updated code.

Is there a way to disable the 'activeX' prompt in IE?

<!DOCTYPE HTML PUBLIC "-//W3C// DTD HTML 4.0 Transitional//EN" "<html>
<head>
<style type="text/css">
body { background color:#003366; table-layout: automatic }
p { color:#668844; font-size:125%; border-top:medium solid #004488; border-bottom:medium solid #004488;
text-align:center }
#Myoutercontainer { position:relative }
#myinnercontainer { position:absolute; top:50%; height:10em; margin-top:-5em }
</style>
</head>

<body>

<div id="myoutercontainer">
<div id="myinnercontainer">
<div style=text-align:center>
<img src=</div>
<p>By using this service you accept that Twin Cities Spine Center cannot provide technical support and is
not responsible for computer related problems associated with its use
</p>
<div style=text-align:center>
<FORM>
<INPUT TYPE="BUTTON" VALUE="I Accept" ONCLICK="window.location.href='</FORM>
</div>
</div>
</div>

</body>
</html>
 
Yes, don't use this:
Code:
onclick="window.location.href='[URL unfurl="true"]http://www.tcspine.com'[/URL]
It will fail for users with javascript anyway and fairly pointless. Use a standard form with a POST method instead so that everyone can use it.


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
The background color is fixed, I'm not sure what I did, but it's working with both browsers now.

OK, thanks for the info on forms. Here's the code I've added, but now when I click I'm getting an error 405 'method not allowed'.

<FORM action=" method="post">
<INPUT type="submit" value="I Accept" />
</FORM>
 
OK, I used the 'get' method instead of the 'post' method in the form and it doesn't error out.
The only funny thing is that it redirects to ' in Firefox. I don't know what that question mark is all about, but at least it's working now (even if I'm not sure it's being redirected correctly with the 'get' method)

Thanks for your help!
 
If your CSS still has "background color" instead of "background-color", I'm surprised it works cross-browser.

This was pointed out very early on in the thread, but you seem to have ignored it.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
You also have CSS rules such as "A.:link" which I don't think is valid.

Personally, I'd make sure all your HTML and CSS validates before attempting to debug any more cross-browser issues.

You might also find more luck in forum215 .

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top