www.webdeveloper.com
Page 2 of 2 FirstFirst 12
Results 16 to 16 of 16

Thread: background code that works in ALL browsers.

  1. #16
    Join Date
    Nov 2002
    Posts
    2,632
    Might be some minor issues due to the lateness when I coded it, but that should be rather close.

    Code:
    <body>
    Code:
    <url id="nav">
        <li><a href="#nogo"> Home </a><span> | </span></li>
        <li><a href="images.htm"> Images </a><span> | </span></li>
        <li><a href="forms.htm"> Forms </a><span> | </span></li>
        <li><a href="register.htm"> Register </a><span> | </span></li>
        <li><a href="memberpages.htm"> Member Pages </a></li>
    </ul>
    Code:
    <table>
        <tr>
            <td>Angles</td>
            <td>Demons</td>
            <td>Animals</td>
        </tr>
        <tr>
            <td>
                <a href="angles.htm">
                    <img src="images/angels/angles1.jpg" width="200" height="200" />               
                </a>
            </td>
            <td>
                <a href="demons.htm">
                    <img src="images/demons/demon1.jpg" width="200" height="200"/>
                </a>
            </td>
            <td>
                 <a href="animals.htm">
                     <img src="images/animals/Animals1.jpg" width="200" height="200"/> 
                 </a>
            </td>
        </tr>
        <tr>
            <td>Magical</td>
            <td>Royal</td>
            <td>?</td>
        </tr>
        <tr>
            <td>
                <a href="magical.htm">
                    <img src="images/magical/Magical1.jpg" width="200" height="200"/> 
                </a>
            </td>
            <td colspan="2">
                <a href="royal.htm">
                    <img src="images/royal/royal1.jpg" width="200" height="200"/>
                </a>
            </td>
        </tr>
    </table>
    Code:
    <style type="text/css">
    a:link {
        color:green;
    }
    a:visited {
        color:blue;
    }
    a:active {
        color:red;
    }
    body {
        background-color:#ccffff;
        color:black;
        background-image:url('images/background.jpg');
        background-repeat: no-repeat;
        background-position: center;
        background-attachment:fixed;
        -webkit-background-size: cover;
        -moz-background-size: cover;
        -o-background-size: cover;
        background-size: cover;
    }
    table {
        margin:0 auto;
        width:100&#37;;
        background-color:#fff;
    }
    td {
        text-align:center;
    }
    #nav {
        margin:0 auto;
        width:100%;
    }
    #nav li {
        display:inline;
    }
    </style>
    Last edited by spufi; 04-22-2012 at 12:22 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles