Posted on 26 August 2008. Tags: div, JavaScript - Ajax
<script>
function go()
{
var a = window.open(”,”,’width=300,height=300′);
a.document.open(“text/html”);
a.document.write(document.getElementById(‘foo’).innerHTML);
a.document.close();
a.print();
}
</script>
<div id=”foo”>This is a test</div>
<input type=”button” onclick=”go()” value=”Print this Page”>
Posted in HTML - XHTML, JavaScript - Ajax, Programming
Posted on 22 July 2008. Tags: div, link
It’s easy to make any div into a link by using a bit of javascript. You can use this technique to make any div “clickable”. For example, you might want your “header” div to link to your home page. Here’s how it’s done.
<div onclick="location.href='http://www.example.com';" style="cursor:pointer;"></div>
you can make your header div clickable by using this code:
<div id="header" onclick="location.href='<?php bloginfo('url');?>';" style="cursor:pointer;"></div>
Posted in CSS, HTML - XHTML
Posted on 22 July 2008. Tags: div, H1, ico
HTML Code
<div id="prdleftcol">
<h1>Φωτογραφίες</h1> <h1>Gallery</h1>
</div>
CSS Code
#prdleftcol{
width:260px; float:left;
border-right:1px solid #E8EBEC;
color:#666666;
font-size:11px;
}
#prdleftcol h1 {
background: transparent url(../images/icn_more.gif) 0px 2px no-repeat;
padding-left: 17px;
padding-bottom: 5px;
margin-top: 10px;
font-size:14px
}
Image Download
Posted in CSS