Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8814417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:07:05+00:00 2026-06-14T04:07:05+00:00

Trying to format a field using HTML. I have the following: <table style=width: 100%;

  • 0

Trying to format a field using HTML.
I have the following:

<table style="width: 100%;" cellpadding="0px" cellspacing="0px">
    <tr>
        <td style="width: 65px;">
            <asp:Label ID="lblKeywords" runat="server" Text="Keywords"
                 AssociatedControlID="txtKeywords" Font-Bold="true"></asp:Label>
        </td>
        <td>
            <asp:TextBox ID="txtKeywords" Width="100%" runat="server"
                 MaxLength="256" placeholder="Use comma to seperate keywords." />
        </td>
    </tr>
</table>

Checking the result, the textbox txtKeywords is 4 pixels longer than its cell.

I assume those are the 4 pixels of the border; what is the best way to deal with this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:07:06+00:00Added an answer on June 14, 2026 at 4:07 am

    You can use the following CSS rule to change box-sizing to “border-box”:

    * { 
        -moz-box-sizing: border-box; 
        -webkit-box-sizing: border-box; 
        box-sizing: border-box;
    }
    

    IMHO this results in behavior that is far easier to grok. For example, a width of “100%” then means 100% including border, margin and padding. You can read more about it here: http://paulirish.com/2012/box-sizing-border-box-ftw/

    Also, as a side note, consider not using tables to align your form fields. Have a look at my blog post about it: http://davidtanzer.net/css_vertical_align

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to format some html output from my db using php and
I'm trying to format a table from XML. Lets say I have this line
I'm trying to scrape the price field from this website using the HTML Agility
I'm trying to format the data display HTML below using CSS. I want the
I'm trying to insert date with MM/dd/yyyy Format into a date format field in
I am trying to read a text file using Dynamics AX. However, the following
I'm trying to get a next field after matching field using awk. Is there
I have a text field in my model called 'about', which I'm trying to
Using report Builder 7.x I am trying to format a TDBText to display postive
I am trying to create a token field using the TokenInput plugin to add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.