Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New to the CF scene
    Join Date
    Jun 2005
    Location
    Oklahoma City
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Working in FF, Not in IE

    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.

    Code:
    .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;
    }
    ---
    Patrick Allmond
    Owner, http://GetYourWebsiteToday.com

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    i've heard people say you need to put quotes around the image
    Code:
    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.

  • #3
    New to the CF scene
    Join Date
    Jun 2005
    Location
    Oklahoma City
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I tried the quotes. They did not works but it was a good suggestion.

    Code:
    <!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:
    Code:
    .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;
    }
    ---
    Patrick Allmond
    Owner, http://GetYourWebsiteToday.com

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I'm a little surprised it works in FF. In your link to the CSS
    Code:
    <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.

  • #5
    New to the CF scene
    Join Date
    Jun 2005
    Location
    Oklahoma City
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    ---
    Patrick Allmond
    Owner, http://GetYourWebsiteToday.com

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    then can you upload the images you are using to a post as an attachment?

  • #7
    New to the CF scene
    Join Date
    Jun 2005
    Location
    Oklahoma City
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK. Don't pay attention to the actual design - it is not final.
    Attached Thumbnails Attached Thumbnails Working in FF, Not in IE-logo.gif  
    ---
    Patrick Allmond
    Owner, http://GetYourWebsiteToday.com

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    locally the image shows fine for me. Remember file names are case sensitive.

  • #9
    New to the CF scene
    Join Date
    Jun 2005
    Location
    Oklahoma City
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It shows OK in IE? Did you use my stylesheet or make up your own?
    ---
    Patrick Allmond
    Owner, http://GetYourWebsiteToday.com

  • #10
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    used your stylesheet and it shows fine in IE.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •