If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Dec 2014
    Member #

    Help Coding HTML/CSS Infographic

    Hello all, I need some help on an infographic I'm working on. I'm a graphic designer by trade, but am currently working on an an html/css-based infographic. I don't know a whole lot about web design, so it's entirely possible I went about this the wrong way, but anyways... Is there a way I can make the infographic resize so it can be viewed better on any screen? I originally used percents, but it was causing all sorts of problems with the spacing of the absolute-positioned graphics. Thanks in advance for the help. The HTML is:

    <!doctype html>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <link href="main.css" rel="stylesheet" type="text/css">
    <script type="text/javascript">
    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    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[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;

    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

    <body onLoad="MM_preloadImages('images/rollover1.png','images/rollover2.png','images/rollover3.png','images/rollover5.png','images/rollover4.png')"> <center>

    <div class="wrapper1"><img src="images/header.png" width="400px" height="auto" alt=""/>
    <a href="" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','images/rollover1.png',1)"><img src="images/graph1.png" class="one" alt="" width="18%" height="auto" id="Image2"></a>

    <a href="" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','images/rollover2.png',1)"><img src="images/graph2.png" class="two" alt="" width="20%" height="auto" id="Image3"></a>
    <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image4','','images/rollover3.png',1)"><img src="images/graph3.png" class="three" alt="" width="18%" height="auto" id="Image4"></a>
    <img src="images/graph4.png" class="four" width="20%" height="auto" alt=""/><br>

    <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','images/rollover5.png',1)"><img src="images/graph6.png" class="five" alt="" width="13%" height="auto" id="Image6"></a>

    <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','images/rollover4.png',1)"><img src="images/graph5.png" class="six" alt="" width="10%" height="auto" id="Image7"></a>

    and the CSS is:

    @charset "utf-8";
    /* CSS Document */
    .wrapper1 {
    position: relative;
    height: 700px;
    width: 1200px;
    .one {
    position: absolute;
    left: 37%;
    top: 110px;
    .two {
    position: absolute;
    left: 46%;
    top: 110px;
    .three {
    position: absolute;
    left: 37%;
    top: 280px;
    .four {
    position: absolute;
    left: 46%;
    top: 270px;
    .five {
    position: absolute;
    left: 33%;
    top: 470px;

    .six {
    position: absolute;
    left: 56%;
    top: 445px;


  3. #2
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Member #
    544 times
    Im on my phone at the moment so i cant help too much but id recommend a start by looking into Media Queries

    Regretfully sent from my iPhone using Tapatalk during lunch and other breaks

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 06:45 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: