October 21, 2005

CSS Tips

Use first-letter pseudo-element to add a special effect to the first letter
of a text.


<style type="text/css">

p:first-letter {color: #ff0000; font-size:xx-large}

</style>

<p>First Letter Testing</p>



Background Image

To repeat a background image vertically

body{ background-image: url('bgImage.jpg'); background-repeat: repeat-y}


To repeat a background image horizontally

body{ background-image: url('bgImage.jpg'); background-repeat: repeat-x}


To Fix a background image

body{ background-image: url('bgImage.jpg'); background-repeat: no-repeat; background-attachment:
fixed}

No comments:

Post a Comment