I spent about 35 minutes on this one and still havent found a logic to it .
But this hack should be remembered .
consider the markup : <div id = a ><input/><div id = “a_child” ></div> </div>
if you need to give a bottom border to the div with id = a and expect it to come below the div with id = “a_child” , then the following css needs to be in place :
#a{ height:auto;overflow:hidden;}
Thanks to vineet and jimit to get out of this one ..
Tags: css
Posted in tricks on July 17th, 2010 by admin>
To make a div or a paragraph editable set the attribute - contenteditable = true
give a fixed width to the div : - width:100px ;
after 100px the word should wrap down , for this add the css property :
word-wrap:break-word;
Happy Hacking
Tags: css
Posted in tricks on July 17th, 2010 by admin>
Ever wondered how you could change the opacity of the background or adjust the alpha quantity for it here is a trick to do so :
e.g.If you want to set a background for body then
in the CSS this is what should follow
body
{background rgba(82,82,82,0.7)}
here ‘rgb’ is for the red,green,blue values respectively and ‘a’ is the alpha/opacity for the background
Tags: alpha, background, css, opacity, rgba
Posted in tricks on May 27th, 2010 by kiran>
To implement constants in css , let your php script output as css by passing the following headers :
header(’content-type:text/css’);
header(”Expires: “.gmdate(”D, d M Y H:i:s”, (time()+900)) . ” GMT”);
Tags: css, php
Posted in tricks on January 23rd, 2010 by admin>