By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,650 Members | 1,778 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,650 IT Pros & Developers. It's quick & easy.

problems with Width on ImageMap

P: n/a
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>
Mar 2 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Solved, somehow I've manage to fix this..
"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
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>

Mar 5 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.