Thursday, August 19, 2010

Inserting image with CSS, as a header on Livejournal?

How do I do this? What is the code? I don't wanna change the whole page, just the header, and make it something I make on Photoshop.

Inserting image with CSS, as a header on Livejournal?
Have you tried image replacement? The idea in image replacement is to replace an block element with an image by defining the block level element to be the size of the image, making the background of that element your chosen image, and hiding the text that would have been there by casting it off the page using relative positioning or text indenting.





so, let's say you have an H1 as your header and you have an image that is 60 x 528, the css would be:





h1 {


background-image: url(imagepath/imagename.jpg);


background-repeat: no-repeat


background-position: 0 0;


height: 60px;


width: 528px;


text-indent: -2000px;


}





that's the general idea.





there are many image replacement methods, all with pros and cons. You can check out http://css-discuss.incutio.com/?page=Ima... for more ideas and explanations, but the above should work.


No comments:

Post a Comment