For people who want to place a DIV over the top of a Canvas layer.
Q. I’ve just been tinkering around with HTML5 and generating a nice radial gradient fill background that takes up 100% width and height of my browser. I’m now wanting to place a normal <div> layer over the top of my <canvas> command. Is there a simple way to do this in CSS?
A. If you want something like this:
Here’s the code:
The CSS looks like this:
{code type=css}
<style type=”text/css”>
body{overflow-x:hidden;
color: #fff;
background-color:#<?php echo ($c1); ?>;
}
div.container{
margin: 0 auto;
padding: 0;
width: 100%;
}
div.wrapper {
left: 0;
padding: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 2;
}
div.adjustmiddle {
margin: 0 auto;
width: 960px;
}
div.content{
background-color: #555;
}
#canvas1{
margin: -8px;
}
</style>
{/code}
And the HTML looks like this:
{code type=html}
{/code}
Comments
Powered by Facebook Comments
Leave a Reply
Hot Topics
- WordPress Contact Form 7 & WP-Mail-SMTP problem solved
- How to take Ownership of a Drive, Folder or File in Windows 7
- The environment variable Home is not set (Solved)
- Failed to initialize OpenGL (Checklist)
- Excel 2007 sort columns & rows data.
- Android SDK Manager won’t start (Solved)
- Creating a Drupal 6 custom login form – Step by Step tutorial.
- Android requires compiler compliance level 5.0 or 6.0. Found ’1.7′ instead. Please use Android Tools > Fix Project Properties.
- IIS7 – No HTTP redirect icon
- WordPress widgets not saving or dragging?
Archives
- April 2013
- March 2013
- February 2013
- December 2012
- November 2012
- July 2012
- June 2012
- May 2012
- February 2012
- November 2011
- September 2011
- August 2011
- June 2011
- January 2011
- December 2010
- November 2010
- October 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- January 2009
- December 2008
- August 2008
- June 2008
