guytrance Posted July 27, 2012 Share Posted July 27, 2012 Hi Guys. I'm trying to inserts an image to represent a div..currently the div just displays a rectangular black shape..i want to put an image instead...i tried a few examples on the web but it didn't go through. the code i want to insert the image to: <div id="promo" class="promo" style="position: absolute; background-color: #333; width: 100px; height: 100px; top: 195px; left: 893px; z-index: 1000;"> <!--view--> </div><!--promo--> and the image url: /wp-content/themes/Tersus/images/piemenu/listen.png how should i do that the proper way? Thanx for any kind of help. Link to comment Share on other sites More sharing options...
eTianbun Posted July 27, 2012 Share Posted July 27, 2012 (edited) Re-phrase your question with example! Edited July 27, 2012 by CodeName Link to comment Share on other sites More sharing options...
Ingolme Posted July 27, 2012 Share Posted July 27, 2012 Are you using an <img> element or the background-image property? Link to comment Share on other sites More sharing options...
guytrance Posted July 27, 2012 Author Share Posted July 27, 2012 (edited) Are you using an <img> element or the background-image property? I'm trying to use an image instead of the styled background that the code have... take a look here -> www.tranceil.fm below the logo there is a right click java app that has a rectangular shape, that shape is the div i mentioned above.i want to put an image instead Edited July 27, 2012 by guytrance Link to comment Share on other sites More sharing options...
eTianbun Posted July 27, 2012 Share Posted July 27, 2012 If you want replace the <div>, then use <img> tag. Ie: <img src="path-to-image/listen.png" style="..."> Link to comment Share on other sites More sharing options...
guytrance Posted July 27, 2012 Author Share Posted July 27, 2012 If you want replace the <div>, then use <img> tag. Ie:<img src="path-to-image/listen.png" style="..."> the div is a trigger for a jQuery plugin..i cant replace it..i need to embed the image inside it Link to comment Share on other sites More sharing options...
eTianbun Posted July 27, 2012 Share Posted July 27, 2012 Then embed it in! I'm using a mobile browser & i cant realy see the div. Link to comment Share on other sites More sharing options...
guytrance Posted July 27, 2012 Author Share Posted July 27, 2012 Then embed it in! I'm using a mobile browser & i cant realy see the div.I cant! thats the whole point it dosent let me. when i try to embed it with <img src its stays as is and when i try to embed it inside style the whole rectangular disappears. no pic. (and yes the picture is in the folder that it says) this is the code i'm trying <div id="promo" class="promo" style=" background-image: url('/wp-content/themes/Tersus/images/piemenu/tunein.png')position: absolute; top: 195px; left: 893px; z-index: 1000;"> <!--view--> </div><!--promo--> Link to comment Share on other sites More sharing options...
dsonesuk Posted July 27, 2012 Share Posted July 27, 2012 <div id="promo" class="promo" style=" background-image: url('/wp-content/themes/Tersus/images/piemenu/tunein.png'); position: absolute; top: 195px; left: 893px; z-index: 1000;"> <!--view--> </div><!--promo--> Link to comment Share on other sites More sharing options...
guytrance Posted July 28, 2012 Author Share Posted July 28, 2012 <div id="promo" class="promo" style=" background-image: url('/wp-content/themes/Tersus/images/piemenu/tunein.png'); position: absolute; top: 195px; left: 893px; z-index: 1000;"> <!--view--> </div><!--promo--> lol...i have no idea how i missed that thanx!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now