2

I am using a custom pager for some data on a website that I am building. The pager works perfectly but the page numbers overlap each other. I am wondering how could I style them to make them look better.

enter image description here

Source Code

<ItemTemplate>
    <asp:LinkButton ID="lnkPage" runat="server" Text='<%#Eval("Text") %>' CommandArgument='<%# Eval("Value") %>'
        style="padding:8px; margin:2px; background:#ac9e94; border:solid 1px #666; font:8pt; color:#594334;"
        CssClass='<%# Convert.ToBoolean(Eval("Enabled")) ? "page_enabled" : "page_disabled" %>'
        OnClick="Page_Changed" OnClientClick='<%# !Convert.ToBoolean(Eval("Enabled")) ? "return false;" : "" %>'>
    </asp:LinkButton>
</ItemTemplate>

I tried giving it a margin but that didn't work.

Michael Liu
  • 52,147
  • 13
  • 117
  • 150

1 Answers1

0

Add display: inline-block; to the style attribute. This will automatically increase the line height to accommodate the extra vertical padding.

Michael Liu
  • 52,147
  • 13
  • 117
  • 150