problems with Width on ImageMap

J

Jeff

ASP.NET 2.0

I've got problems with the Width of the ImageMap below. The problem is that
the ImageMap's Width doesn't have any effect in my GridView, the width are
determine by width of the column and the with of the div (the div the
ImageMap is included in). In the code below the column & div has Width of
300px and ImageMap has Width of 130, but when the page holding this GridView
is displayed then the Width is 300 on the ImageMap. I want the width of the
column & div to be wider than the ImageMap, because then I can centre the
ImageMap and display a background color... But as it now the ImageMap fills
the entire column & div... This problem is also on ImageMap's Height
property

Any suggestions?

Here is my problem code:
<asp:GridView ID="gridUsers"
runat="server"
AutoGenerateColumns="false"
OnRowDataBound="gridUsers_RowDataBound" Width="100%" BorderStyle="None"
BorderWidth="0" >
<Columns>
<asp:TemplateField HeaderStyle-Width="300px"
FooterStyle-Width="300px" ControlStyle-Height="140px"
ControlStyle-Width="300px" >
<HeaderTemplate>
dsfgsdg
</HeaderTemplate>
<ItemTemplate>
<div style="width:300px; height:140px;
background-color:#CCEE00;">
<asp:ImageMap ID="MemberPhoto" runat="server"
OnClick="OnClick" HotSpotMode="PostBack" Width="130" Height="140">
<asp:RectangleHotSpot Top="0" Left="0" Right="75"
Bottom="75" />
</asp:ImageMap>
</div>
</ItemTemplate>
<FooterTemplate></FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top