problems with Width on ImageMap

Discussion in 'ASP .Net' started by Jeff, Mar 2, 2007.

  1. Jeff

    Jeff Guest

    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>
     
    Jeff, Mar 2, 2007
    #1
    1. Advertising

  2. Jeff

    Jeff Guest

    Solved, somehow I've manage to fix this..


    "Jeff" <> wrote in message
    news:%23np%...
    > 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>
    >
     
    Jeff, Mar 5, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Fidge

    Client-side imagemap editor?

    Ben Fidge, Oct 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    561
    Patrice
    Oct 13, 2004
  2. KatB
    Replies:
    4
    Views:
    497
  3. Roy
    Replies:
    2
    Views:
    643
  4. AndrewF
    Replies:
    1
    Views:
    840
    Bruce Barker
    Oct 10, 2005
  5. Alan Wang

    imageMap

    Alan Wang, Nov 23, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    533
    Alan Wang
    Nov 23, 2005
Loading...

Share This Page