kurt.santo Posted November 15, 2007 Share Posted November 15, 2007 How do you guys make a text overlap a photo on a webpage (transparent background, so image still shows)? I achieved that, but seems rather going around the corner twenty times. Sure there is an easy way to do this...Kurt Link to comment Share on other sites More sharing options...
Ingolme Posted November 15, 2007 Share Posted November 15, 2007 Maybe you want to use the photo as a background image:div.class {background-image: url(image URL);background-position: 200px 50px;background-repeat: no-repeat;}****************<div class="class">Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text</div>Another thing you can do is this:<div style="position: relative"><img src="image URL" alt="Alternate text" style="position: absolute; top: 200px; left: 50px; z-index: -1;" />Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text </div> Link to comment Share on other sites More sharing options...
SpOrTsDuDe.Reese Posted November 15, 2007 Share Posted November 15, 2007 Is that the CSS code for this? Link to comment Share on other sites More sharing options...
kurt.santo Posted November 15, 2007 Author Share Posted November 15, 2007 Maybe you want to use the photo as a background image:div.class {background-image: url(image URL);background-position: 200px 50px;background-repeat: no-repeat;}****************<div class="class">Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text</div>Another thing you can do is this:<div style="position: relative"><img src="image URL" alt="Alternate text" style="position: absolute; top: 200px; left: 50px; z-index: -1;" />Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text </div>Image in background does the job. Cheers,Kurt Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.