Centering and scaling divs to fit any browser

Discussion in 'General Computer Support' started by tcarone07, Feb 6, 2009.

  1. tcarone07

    tcarone07

    Joined:
    Feb 6, 2009
    Messages:
    1
    I don't know much about web design so maybe I'm going about this the wrong way but...

    I'm created a div with several icon images and then a few other divs that contain images that would be linked to other pages I need a code to center and scale the div images to fit the browser. thanks!

    #apDiv1 {
    position:absolute;
    left:217px;
    top:199px;
    width:517px;
    height:265px;
    z-index:1;
    }
    #apDiv2 {
    position:absolute;
    left:10px;
    top:0px;
    width:200px;
    height:200px;
    z-index:5;
    }
    #apDiv3 {
    position:absolute;
    left:294px;
    top:118px;
    width:1px;
    height:1px;
    z-index:6;
    }
    #apDiv4 {
    position:absolute;
    left:250px;
    top:50px;
    width:125px;
    height:75px;
    z-index:6;
    }
    #apDiv5 {
    position:absolute;
    left:500px;
    top:50px;
    width:125px;
    height:75px;
    z-index:7;
    }
    #apDiv6 {
    position:absolute;
    left:748px;
    top:82px;
    width:1px;
    height:2px;
    z-index:8;
    }
    #apDiv7 {
    position:absolute;
    left:750px;
    top:50px;
    width:150px;
    height:75px;
    z-index:8;
    }
    -->
    </style>
    <script type="text/javascript">
    <!--
    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
    }
    //-->
    </script>
    </head>

    <body>
    <div id="apDiv1">
    <p><a href="lobster.html" border=0><img src="icons/lobstericon.jpg" alt="lobster" width="100" height="100" border="0" /></a> <a href="polarbear.html"><img src="icons/polarbearicon.jpg" alt="polar bear" width="100" height="100" border="0" /></a> <img src="icons/catcollageicon.jpg" alt="cat" width="100" height="100" /> <img src="icons/inkyicon.jpg" alt="ink" width="100" height="100" /> <img src="icons/socksicon.jpg" alt="socks" width="100" height="100" /><img src="icons/oddgodicon.jpg" alt="odd god" width="100" height="100" /> <img src="icons/catsicon.jpg" alt="cats" width="100" height="100" /> <img src="icons/doeicon.jpg" alt="doe" width="100" height="100" /> <img src="icons/mouseicon.jpg" alt="mouse" width="100" height="100" /> <img src="icons/thanksicon.jpg" alt="thanks" width="100" height="100" /></p>
    </div>
    <div id="apDiv2"><img src="" alt="" name="octopus" width="200" height="200" id="octopus" /></div>
    <div id="apDiv4"><img src="" alt="" name="about" width="200" height="75" id="about" /></div>
    <div id="apDiv5"><img src="" alt="" name="blog" width="200" height="75" id="blog" /></div>
    <div id="apDiv7"><img src="" alt="" name="contact" width="200" height="75" id="contact" /></div>
    </body>

    </html>
     
    tcarone07, Feb 6, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Networking Student
    Replies:
    4
    Views:
    1,326
    vreyesii
    Nov 16, 2006
  2. bjaynes@montanaport.net

    Centering prints from 2200 in Windows

    bjaynes@montanaport.net, Aug 25, 2006, in forum: Digital Photography
    Replies:
    4
    Views:
    333
    Roy G
    Aug 27, 2006
  3. Richard

    Excel centering

    Richard, Nov 28, 2007, in forum: Computer Support
    Replies:
    1
    Views:
    509
    Gordon
    Nov 28, 2007
  4. Solving a Problem

    Divs and Layers

    Solving a Problem, Jan 6, 2008, in forum: Microsoft Certification
    Replies:
    0
    Views:
    443
    Solving a Problem
    Jan 6, 2008
  5. David Friedl

    MDS SAN and scaling with bladeservers

    David Friedl, Aug 9, 2008, in forum: Cisco
    Replies:
    0
    Views:
    406
    David Friedl
    Aug 9, 2008
Loading...

Share This Page