0

I am using ASP.NET 2.0.

I have Image and ImageButton Side by Side by like this.

 <div style="width:80px">
    <asp:Image ID="innerImgDesk1" runat="server"  ImageUrl="~/images/advlefttop.png"  Width ="60px"/> 
    <asp:ImageButton ID="ImgDeskIndicator1" runat="server" Width="20px" ImageUrl="~/images/Indicators/blue.png"/>
</div>

I want the ASP.NET Imagebutton on top of Image. I should see image button kind of indicator, where Imagebutton color will be changing. But Image color remains same.

Currently using the above code, it displays like below.

CurrentlyDisplaysLikeThis

I want it to be displayed like below,

enter image description here

Could anyone tell me What I should do to display ImageButton on Image.

Thank you

2 Answers 2

1

Try setting the image as background image of the div tag like the following code:

<div style="width:80px; background: url(images/advlefttop.png)">
    <asp:ImageButton ID="ImgDeskIndicator1" runat="server" Width="20px" ImageUrl="~/images/Indicators/blue.png"/>
</div>

Hope this helps!

  • Corix
Sign up to request clarification or add additional context in comments.

Comments

0

if you are just worried about displaying button over image-button than you can do this by using div absolute position like

<div style="position:relative">
<div style="position:absolute">image button</div>
<div style="position:absolute> button</div>
</div>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.