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
    L27
    L27 is offline
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    2 backgrounds on Internet explorer

    I'm looking for help getting multiple backgrounds to work in older browsers like IE. Any help would be amazing thanks.

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Can you link your site? or at least provide the code you have?

    Multiple backgrounds in what way? a background that changes after a given time? event? or several backgrounds on a single page at once.
    Teed

  • #3
    L27
    L27 is offline
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by teedoff View Post
    Can you link your site? or at least provide the code you have?

    Multiple backgrounds in what way? a background that changes after a given time? event? or several backgrounds on a single page at once.
    Here http://deathcraft.l27nexus.com/index.html the grey stone is one background the grey content area is the second. The CSS code works in firefox because it's CSS3 but of course IE isn't supported. I want 2 backgrounds to be working in IE.

    thanks.

  • #4
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    You dont declare a doctype, and have several other code errors you should fix. You can view them here.

    You should always have a valid doctype to ensure cross browser compliance. Fixing these errors might not resolve your issue, but its a start.

    Also you should know why tables for layouts are bad, and I see no reason why a table was needed here at all.

    Post back if you have trouble fixing those errors.
    Teed

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,746
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello L27,
    You would be better off presenting that second background image as a background of another div element.

    Start with something like this -
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    html, body {
    	margin: 0;
    	background: url(http://deathcraft.l27nexus.com/images/background.jpg);
    }
    #container {
    	height: 600px; /*demo only*/
    	width: 1000px;
    	margin: 30px auto;
    	background: url(http://deathcraft.l27nexus.com/images/main.gif);
    }
    </style>
    </head>
    <body>
        <div id="container">
        <!--end container--></div>
    </body>
    </html>
    Teed is right, you should not be using tables for this.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #6
    L27
    L27 is offline
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Alright I've gone through and fixed a few of these errors. The ones I didn't fix are for example (there is no attribute "ALIGN"). I left these in because dreamweaver seems to think this is a valid attribute, the whole attribute is (<table align>) do you have any advice on why I should correct/remove these.

    Also yes IE 9 is showing both backgrounds now which I'm happy about. Although if you look at the site yourself in IE the side bars have gone funny any idea why that is?

    Last question while correcting these errors my buttons have all moved down leaving a grey area do you have any idea why this has happened and how i go about fixing it.

    Thanks for all your help.

  • #7
    L27
    L27 is offline
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    Hello L27,
    You would be better off presenting that second background image as a background of another div element.

    Start with something like this -

    Teed is right, you should not be using tables for this.
    This is what I get using your code. http://deathcraft.l27nexus.com/testcode.html

  • #8
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,746
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Quote Originally Posted by L27 View Post
    This is what I get using your code. http://deathcraft.l27nexus.com/testcode.html
    Like I said, it's a place to start. When you add things that break it, you will be learning as you go by fixing them.

    Read the link about tables in my signature line.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #9
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Quote Originally Posted by L27 View Post
    Alright I've gone through and fixed a few of these errors. The ones I didn't fix are for example (there is no attribute "ALIGN"). I left these in because dreamweaver seems to think this is a valid attribute, the whole attribute is (<table align>) do you have any advice on why I should correct/remove these.
    That attribute was replaced by CSS commands in CSS 1, it is still supported for backwards compatibility only. You should use float to replace it for aligning left or right and use margin:0 auto for centre alignment.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #10
    L27
    L27 is offline
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    Like I said, it's a place to start. When you add things that break it, you will be learning as you go by fixing them.

    Read the link about tables in my signature line.
    Quote Originally Posted by felgall View Post
    That attribute was replaced by CSS commands in CSS 1, it is still supported for backwards compatibility only. You should use float to replace it for aligning left or right and use margin:0 auto for centre alignment.
    Literally all I want sorting out now is my buttons to be touching the image as it used to be instead of that grey area any ideas?


  •  

    Posting Permissions

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