Table Printing Issue: Gaps in top and Bottom Border of th Elements

Table Printing Issue: Gaps in top and Bottom Border of th Elements

Content Index :

Table Printing Issue: Gaps in top and Bottom Border of th Elements
Tag : html , By : user184415
Date : November 25 2020, 07:06 PM

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon
becomes visible or invisible, I think the most straightforward way is to put it in a whenever it's invisible. Then you can keep the border around the the tbody (or rather, around the cells in the tbody) and make the tfoot invisible.
table, tbody, thead, tfoot, tr {
  border-collapse: separate; border-spacing: 0; border-radius: .5em;

tbody tr:first-child td {border-top: 2px outset #777;}

tbody tr:last-child td {border-bottom: 2px outset #777;}

tbody td:first-child {border-left: 2px outset #777;}

tbody td:last-child {border-right: 2px outset #777;}

tbody tr:first-child td:first-child {border-top-left-radius: 0.5em;}

tbody tr:first-child td:last-child {border-top-right-radius: 0.5em;}

tbody tr:last-child td:first-child {border-bottom-left-radius: 0.5em;}

tbody tr:last-child td:last-child {border-bottom-right-radius: 0.5em;}

.invisible {visibility: collapse; display: none;}
  <caption>This is the table:</caption>
      <td>this is visible.</td>
      <td>this is visible.</td>
      <td>this is visible.</td>
      <td>this is visible.</td>
  <tfoot class="invisible">
      <td colspan="3">this is not.</td>

IE 10 Missing border segments while printing table elements

Tag : development , By : user183289
Date : March 29 2020, 07:55 AM
help you fix your problem I came across a similar issue in IE 9. The top half of the border on the first row of the first table on a page would not appear on the paper version of the page. When I load your code I see the same symptom.
I worked around our problem by combining the border rules for the table, th, and td into a single rule. The trick appears to work for yours as well, but it means the outer border will be the same size as the inner border:
    table {
            border-collapse: collapse; 

    table, th, td {
            border: 1px solid black;

td border , border-bottom is not printing in pdf by using itext library

Tag : java , By : mikhaelrasputin
Date : March 29 2020, 07:55 AM
wish help you to fix your issue Allow me to reuse the code from iTextSharp add ( css style or a css file) and download pdf file and slightly change some values:
public static final String CSS = "th { border-top: 5px solid green; } "
    + "td { font-size: 10pt; border-color: gray; border: 3px}";
public static final String HTML = "<html><body><table  class='table-bordered'>"
    + "<thead><tr><th>Customer Name</th><th>Customer's Address</th> </tr></thead>"
    + "<tbody><tr><td> XYZ </td><td> Bhubaneswar </td></tr>"
    + "<tr><td> MNP </td><td> Cuttack </td></tr></tbody>"
    + "</table></body></html>";

 * @param file
 * @throws IOException
 * @throws DocumentException
public void createPdf(String file) throws IOException, DocumentException {
    Document document = new Document();
    PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(file));

    CSSResolver cssResolver = new StyleAttrCSSResolver();
    CssFile cssFile = XMLWorkerHelper.getCSS(new ByteArrayInputStream(CSS.getBytes()));

    // HTML
    HtmlPipelineContext htmlContext = new HtmlPipelineContext(null);

    // Pipelines
    PdfWriterPipeline pdf = new PdfWriterPipeline(document, writer);
    HtmlPipeline html = new HtmlPipeline(htmlContext, pdf);
    CssResolverPipeline css = new CssResolverPipeline(cssResolver, html);

    // XML Worker
    XMLWorker worker = new XMLWorker(css, true);
    XMLParser p = new XMLParser(worker);
    p.parse(new ByteArrayInputStream(HTML.getBytes()));

How to give corner of table cell border the color of top/bottom border instead of the left/right border

Tag : css , By : fukas78
Date : March 29 2020, 07:55 AM
this will help You can get them with a pseudo element, which will be the size of the whole row + borders. Then reapply only top and bottom border.
table {
  border-collapse: collapse;
  text-align: center;

table tr td {
  border: 8px solid grey;
  border-top: none;

table tr:first-child {
  border: 8px solid black;

table tr th:not(:last-child) {
  border-right: 8px solid red;

table tr th {
  position: relative;

table tr th::before {
  content: "";
  position: absolute;
  top: -8px; left: -8px;
  width: calc(100% + 16px); height: 100%;
  border-width: 8px 0;
  border-color: black transparent;
  border-style: solid;
I want:
    <th> black-bordered </th>
    <th> row </th>
    <th> separated </th>
    <th> with </th>
    <th> reds </th>
    <td> everything </td>
    <td> below </td>
    <td> it </td>
    <td> simply </td>
    <td> grey </td>

How can I place a border-bottom on the last visible row of a table with border-collapse=separate?

Tag : css , By : cjdavis
Date : March 29 2020, 07:55 AM
wish help you to fix your issue If you can change the HTML when the

How would I remove those small gaps on the bottom and right side of the navbar elements?

Tag : html , By : pepper
Date : March 29 2020, 07:55 AM
I wish this helpful for you I'm trying to remove those small gaps between my nav-link elements and navbar on the bottom as well as on the right side, but can't seem to figure out. I tried setting min-height: 0 and changing it to display: flex and tweaking the justify-content and align-items properties, but didn't achieve the desired outcome. How else could I make it work? , Replace this css
#navbar {
font-size: 1.4em;
width: 50%;
text-align: right;
background-color: orange;
/* padding: 10px 0px 10px 0px; */
display: flex;
justify-content: flex-end;
Related Posts Related QUESTIONS :
  • What relation is there between Angular's <ng-content> and ShadowDOM
  • CSS background for div element is not working
  • CSS Marquee: multiple paragraphs overlaps
  • I want to align search bar to extreme right
  • Getting blank white space to the left of content inside pre tags
  • My viewer.html won't load any css and jss files
  • How to apply multiple styles to HTML to only part of a title?
  • Want to make text div transparent on a parallax area
  • Is there a way to make this ID plus descendants CSS rule less specific?
  • Is there a way to drop in a stylesheet to get a Material theme or similar for all form elements on the page?
  • How do I make a sideways L look in html/css?
  • Why won't the color #e67d22e1 display in Safari?
  • How to select specific tag's attribute value with xPath?
  • How to make div rows fill available height
  • How to fix text inside a block that grows
  • svg hexagon halftone pattern
  • How to edit a website's element's background colors using a chromium extention
  • What is the main tag in HTML5 ? How does it differ from body tag?
  • My image is flowing out from my div column. How I can fix it and made the image full-size into div
  • How to draw line in react
  • Why Transition css is not working in child selector css
  • How to modify materialize css select option?
  • How to center some text in a rectangle in CSS?
  • How do I equally space out css grid columns?
  • How to make sure all the parts of a macro are running correctly?
  • How to adjust the zoom of website at different browser at different screen size?
  • Can't set max height on child div properly
  • Why background color is not applying to DIV container?
  • Need to select the first-child
  • No space between attributes in buttons
  • How can I block google from crawling my page, but still let Baidu do it?
  • Rendering html content in matToolTip (Angular)
  • Embedding an iframe when iframe height is variable
  • How to use 'word-break: break-word' with link inside of text?
  • How I can animate circular progress bar from left to right?
  • Angular 6 - How can I hide a div onclick of outside of that div
  • How to fill an inline-block div with a solid color?
  • Form file doesn't align with rest of form
  • How to trim off left and right sides of image evenly as I reduce my screen size? (@media query)
  • How can I password protect a section of a static website?
  • Move a div up when I hover over it
  • Why is "align" not a valid attribute of div but still works?
  • Behavior with height/minHeight and display:flex
  • How can i change my h2 title to <p> text while keeping size and alignment?
  • Hover on the text to change size using CSS
  • How to keep a grid of cols without breaking on a new row?
  • Why is bottom: 0 not enough to move ::after content directly below main content?
  • Why does a React build need to be served? Why can't I just open it in the browser?
  • What is the proper way to target the tab key 'highlight' events on an html element?
  • How to Implement dot and line below the text in CSS?
  • DIVs not properly aligned
  • HTML 'for' tag not working for <p> but works on <label>
  • <p> element does not appear to be within parent <footer> element
  • Why flex container is smaller than its content
  • Center an image and a text in a div
  • .class with display: none -> .class:focus with display: block; causes links to not work
  • Best way to use a right pointing arrow in CSS animation
  • Angular 7 : Select tag doesn't display options
  • Orientation: Landscape showing true for desktop
  • How to adjust text in a table
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com