2 Replies - 1111 Views - Last Post: 20 July 2012 - 07:44 PM Rate Topic: -----

#1 Huiqirock  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-July 12

Spaces between Image Buttons

Posted 20 July 2012 - 05:12 AM

Hi! There are white spaces between my image buttons. I want it to be like a menu bar. In design mode in visual studio it seems fine but there are gaps between the buttons when i debug.


In debug view:
Posted Image

In visual studio design view:
Posted Image

Here's the codes if it's of any help:

<tr>
<td class="style2" colspan="2"
align="center" rowspan="1"
style="White; background-color: #FFFFFF;">
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/Images/home3.jpg" PostBackUrl="~/Default.aspx" />

<asp:ImageButton ID="ImageButton2" runat="server"
ImageUrl="~/Images/AboutUs2.jpg" PostBackUrl="~/AboutUs.aspx" />


</td>
</tr>

Appreciate if someone can help me resolve this issue. Thank you!

Is This A Good Question/Topic? 0
  • +

Replies To: Spaces between Image Buttons

#2 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 444
  • View blog
  • Posts: 1,492
  • Joined: 28-April 09

Re: Spaces between Image Buttons

Posted 20 July 2012 - 06:19 PM

You should never trust the designer to create your html for you, it almost never renders to a browser quite how it looks inside visual studio. Do you have any styles affecting anchor tags in your stylesheets? That could be one reason why it would be appearing differently between visual studio and the browser. Another option would be to put a background behind the menu buttons that match the background of the menu buttons, then you wouldn't see any breaks between them.
Was This Post Helpful? 0
  • +
  • -

#3 mrburnttoast  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 28-December 11

Re: Spaces between Image Buttons

Posted 20 July 2012 - 07:44 PM

Did you try using
borderCollapse="collapse"
in the css for your table. If that doesn't work can you post the css? I believe I solved this issue before with borderCollapse though.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1