...

View Full Version : Working in FF, Not in IE



patrick24601
06-30-2005, 07:57 PM
Is there anything odd about the waythat IE handles CSS background images? The code below works in Firefox but not IE - the background will show in one and not the other.



.content
{ border:1px solid black;
float: left;
visibility: visible;
background-position: center;
background-repeat: no-repeat;
background-image: url(images/logo.gif);
width: 75%;
position: relative;
height: 500px;
}

_Aerospace_Eng_
06-30-2005, 08:26 PM
i've heard people say you need to put quotes around the image

background-image: url('images/logo.gif');
I personally haven't had a problem without doing that. Can you show us your page? Its likely something else causing the problem.

patrick24601
06-30-2005, 08:36 PM
I tried the quotes. They did not works but it was a good suggestion.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<title>VHA HPDM Leadership and Workforce System</title>
<meta content="True" name="vs_showGrid">
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<LINK href="styles\default.css" type="text/css" rel="stylesheet">
</HEAD>
<body MS_POSITIONING="GridLayout">
<div class="main" id="main">
<div class="menubar" id="menubar">
</div>

<div class="infoarea" id="infoarea"><span id="ApplicationMessage_mainmessage"></span>

</div>
<div class="mynavbar" id="nav2"></div>
<div class="content" id="content"><form name="defaultForm" method="post" action="default.aspx" id="defaultForm">

<P align="center"><FONT face="Arial Black" size="6" color="#000000">&nbsp;Main Content will go here
</FONT></P>

</form>
</div>
</body>
</html>
</div>


Style Sheet:


.main
{
width: 100%;
height: 700px;

}

.menubar
{
visibility: visible;
width: 100%;
height: 30px;
}

.infoarea
{
visibility: visible;
margin: auto;
width: 100%;
height: 30px;
background-color: white;
}

.mynavbar
{
float: left;
visibility: visible;
width: 20%;
position: relative;
height: 500px;
}

.content
{ border:1px solid black;
padding: 3px;
float: left;
visibility: visible;
background-position: center;
background-repeat: no-repeat;
background-image: url('images/logo.gif');
width: 75%;
position: relative;
height: 500px;
}

_Aerospace_Eng_
06-30-2005, 08:43 PM
I'm a little surprised it works in FF. In your link to the CSS

<LINK href="styles\default.css" type="text/css" rel="stylesheet">
You have a backslash instead of a forward slash. Fix that and see if it makes a difference. If not I need a link because there is no possible way to see if something works or not without the images.

patrick24601
06-30-2005, 09:19 PM
I changed the backslash and it did not work. Another good catch though.

And unfortunately for me I am on an Intranet!

I'll be back.

_Aerospace_Eng_
06-30-2005, 09:24 PM
then can you upload the images you are using to a post as an attachment?

patrick24601
06-30-2005, 09:43 PM
OK. Don't pay attention to the actual design - it is not final.

_Aerospace_Eng_
06-30-2005, 10:58 PM
locally the image shows fine for me. Remember file names are case sensitive.

patrick24601
07-01-2005, 03:55 PM
It shows OK in IE? Did you use my stylesheet or make up your own?

_Aerospace_Eng_
07-01-2005, 04:03 PM
used your stylesheet and it shows fine in IE.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum