Html.index question ?

  • also add

    > html,body {margin:0;padding:0;border:0}
    

    default margins / padding are set to be > 0 by default by the browser that's why it's off i think.

    Where would I implement this ?

    I am really new to html5 stuff.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think to put every <style> tags into the <header> tag before the <body> is the way to go as far as css formating goes.

    I don't know if you already seen it but I wrote a tutorial about customizing the index.html page a while ago and added some more concrete example at the end after popular request.

    I hope this can guide you along the way.

  • the basics are:

    <style type="text/css">
    element {attribute: value; attribute2: value;}
    otherelement {attribute: value;}
    moreelements, somethingelse {attribute: value}
    </style>
    

    based on that:

    <style type="text/css">
    
    html,body {
       margin:0;padding:0;border:0
    }
    
    canvas {
       border: 1px solid red;
    }
    
    body {
       background-image: url('iPhone.gif');
       background-repeat: no-repeat;
       background-attachment: fixed;
       background-position:center center;
    }
    </style>
    
  • Kyatric@

    I think to put every <style> tags into the <header> tag before the <body> is the way to go as far as css formating goes.

    I don't know if you already seen it but I wrote a tutorial about customizing the index.html page a while ago and added some more concrete example at the end after popular request.

    I hope this can guide you along the way.

    I only started this thread after reading your excellent index,html tutorial !

    ----------------------------------------------------------------------

    ranma@

    the basics are:

    <style type="text/css">

    element {attribute: value; attribute2: value;}

    otherelement {attribute: value;}

    moreelements, somethingelse {attribute: value}

    </style>

    based on that:

    <style type="text/css">

    html,body {

       margin:0;padding:0;border:0

    }

    canvas {

       border: 1px solid red;

    }

    body {

       background-image: url('iPhone.gif');

       background-repeat: no-repeat;

       background-attachment: fixed;

       background-position:center center;

    }

    </style>

    ---------------------------------------------------

    I think my brain is finally starting to digest this stuff.

    Thanks for the tips.

  • Here's the finished example:

    View

    Here's the project files:

    Download

    I think there is still 1 problem relating to the (z-index:-1;) of the iphone image?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)