# CSS Image Replacement

**URL:** <https://forum.kirupa.com/t/css-image-replacement/70870>\
**Category:** web dev\
**Created:** [November 18, 2004, 3:42pm UTC](https://forum.kirupa.com/t/css-image-replacement/70870 "2004-11-18T15:42:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wyclef](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@wyclef](https://forum.kirupa.com/u/wyclef)\
**Post date:** [November 18, 2004, 3:42pm UTC](https://forum.kirupa.com/t/css-image-replacement/70870/1 "2004-11-18T15:42:00Z")

</div>

Hi,

I’m trying to use the text-indent method for image replacement but am having trouble in Opera ignoring the float. Have a look…

```auto

<div id="heading"><h2 title="A-C">A-C</h2></div>

```

```auto

#heading h2 {
	text-indent: -9000px;
	width: 175px; height: 35px; 
	margin: 0; padding: 0;
	background: url(/a-c.gif) no-repeat top left;
}

```

I’ve been able to hack the image in Opera to the position I want it to go by adding a margin-left style to the #heading id, but i was wondering if there is a better workaround than that.
