USPS Site: Background switch

Discussion in 'Web Design and Development' started by macaddict23, Mar 29, 2007.

  1. macaddict23 macrumors 6502

    macaddict23

    Joined:
    Jun 20, 2006
    Location:
    MacVille, USA
    #1
    www.usps.com

    StarWars! Cool! For a second I thought I typed in the wrong URL. Anyway, on the upper-right corner of the page, there's an ON/OFF that allows you to change the background image. How does a web newbie like myself go about doing this?
    Thanks!
     
  2. needlnerdz macrumors regular

    needlnerdz

    Joined:
    Jun 10, 2006
    Location:
    switzerland
    #2
    Learn CSS... or how to hack away at prewritten scripts. If you look at the 'View Source' of the page.. you will see this bit of code:

    <link href="assets_toset5/css/sw.css?1" rel="stylesheet" type="text/css">

    <script language="javascript" src="assets_toset5/js/starWarstakeover.js?1"></script>

    <!--<link href="assets_toset5/css/yoda.css" rel="stylesheet" type="text/css">-->


    - Now this may look like greek to you.. but what you should notice, is that there are two different .css files being referenced to. The sw.css and yoda.css.. essentially the page has the exact same info or data across it.. its just HOW its displayed, and what said graphics looks like, that is controlled via css... pretty flippin cool when you learn how to master it (of which I am far from... but would like to be).

    Another great example of the power of altering a CSS layout to control the page can be found here:

    http://www.csszengarden.com/

    - there they demo just what can be done when you only alter a CSS page and the graphics tied into it.. if I may give one more linke, youve got to check out this persons altercation to the page, which is quite inspiring:

    http://www.csszengarden.com/?cssfile=/202/202.css&page=0


    - hope that helps you out
     
  3. macaddict23 thread starter macrumors 6502

    macaddict23

    Joined:
    Jun 20, 2006
    Location:
    MacVille, USA

Share This Page