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 9237135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:27:59+00:00 2026-06-18T07:27:59+00:00

See the following documents: <table> <tr> <td> <p>foo bar baz</p> </td> </tr> </table> and

  • 0

See the following documents:

<table>
  <tr>
    <td>
      <p>foo bar baz</p>
    </td>
  </tr>
</table>

and this:

td {
  padding: 10px;
  border-bottom: 1pt solid gray;
}

which results in something like

result of html snippet

The rule is always the width of the table cell. Is there any CSS/HTML way of making the rule smaller (taking up less space horizontally)?

I need the rule to be some specified size which is smaller than the cell width. This is how it should look like (I hope you get the point – and the double dash is easy, of course):

   123.44
  2312.49
 --------
    12.12
  1231.44
 ========
  1234.33
  • 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-18T07:28:01+00:00Added an answer on June 18, 2026 at 7:28 am

    Do you mean that the bottom border should be shorter than the width of the td? In that case this is not possible, however you could add an element that represents your border and give that element a width shorter than 100%. Technically I would advise a hr but div could do the same thing and is perhaps easier to understand.

    HTML

    <table>
      <tr>
        <td>
          <p>foo bar baz</p>
          <div style="width:75%;border-bottom:1px solid #000;"> </div>
        </td>
      </tr>
    </table>
    

    Live demo
    http://jsfiddle.net/Zs9dG/

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

Sidebar

Related Questions

See the following: struct A { std::string* get() const { //return const_cast<std::string*>(&m_pObj); return &const_cast<A*>(this)->m_pObj;
I have the following table: <table width=1000 border=1 cellpadding=2 cellspacing=2 bordercolor=#CCCCCC class=WebApps id=addIssue> <tbody>
See following code with resides in fillowing directory mypack.pack1 package mypack.pack1; public class myclass
Please see following methods. public static ProductsCollection GetDummyData(int? customerId, int? supplierId) { try {
Please see following examples first, and which one is better? Could you compare some
How can I implement cross browser opacity gradient (not color gradient)? See following code:
See the following code of the <?php class DefaultController extends Controller { public function
See the following output: 1.9.3p194 :001 > player = Player.randomize_for_market => #<Player id: nil,
See the following Mock Test by using Spring/Spring-MVC public class OrderTest { // SimpleFormController
Please see the following manifest. The Activity_1's primary objective has mapInfo refers to a

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.