css does not bind borders with rounded limits

Is there a way to make the bottom border rounded at the ends? I want the solid line to have rounded edges, but it's not working with my current table code.

<p-table [value]="fg?.controls?.treesSummary?.controls" styleClass="sumTable">
        <ng-template pTemplate="header">
          <tr>
          </tr>
          <tr *ngFor="let item of  fg?.controls?.treesSummary?.controls; let i = index" [formGroupName]="i" class="gray-border">
            <th class="th_first_t">
              <input type="number" [attr.disabled]="true" #ddNames [value]="this?.fg?.get('treesSummary')?.controls[0]?.get('copying')?.value +
              this?.fg?.get('treesSummary')?.controls[0]?.get('unproot')?.value +
              this?.fg?.get('treesSummary')?.controls[0]?.get('conservation')?.value"
              digitOnlyTextBox pInputText />
            </th>
            <th class="th"><input type="number" #ddNames digitOnlyTextBox formControlName="conservation" pInputText /></th>
            <th class="th"><input type="number" #ddNames digitOnlyTextBox formControlName="copying" pInputText /></th>
            <th class="th_last_t"><input type="number" #ddNames digitOnlyTextBox formControlName="unproot" pInputText /></th>

          </tr>
        </ng-template>

      </p-table>

css

.gray-border {
  border-left: 1px solid gray;
  border-right: 1px solid gray;
  border-bottom: 1px solid gray;
}
.th_last_t {
    border-radius: 0px 0 0 15px !important;
    background-color: red !important;
}
.th_first_t {
  border-radius: 0 0px 15px 0 !important;
  background-color: #edf3fb !important;
}

https://i.sstatic.net/UxO4M.png rounded with flex https://i.sstatic.net/SRV8o.png

Answer №1

After reviewing the question, it appears that you will also need to apply the border radius to .gray-border:

.gray-border {
  ...
  border-radius: 0 0 15px 15px;
}

I have noticed a correction needed for the border radius of th_first_t and th_last_t elements:

.th_last_t {
    ...
    border-radius: 0 0px 15px 0 !important;
}
.th_first_t {
    ...
    border-radius: 0px 0 0 15px !important;
}

You can view an example on jsfiddle: https://jsfiddle.net/ds0uph3v/

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Adjust and resize video backgrounds within parent elements on iframes

Consider the code snippet below: <div class="viewport"> <iframe src="youtube.com/blabla"></iframe> </div> Accompanied by this CSS: .viewport { height: 100vh; width: 100%; } iframe { position: absolute; } If we t ...

Switching between a secondary menu using ClassieJS or jQuery?

Currently, the code is configured to toggle the same menu for every icon. To see my current progress, you can check out this fiddle: http://jsfiddle.net/2Lyttauv/ My goal is to have a unique menu for each individual icon. I began by creating the followi ...

focusing on a specific category within a CSS identifier

My goal is to specifically target the class .page-has-children within this code snippet: <div id="dc_jqverticalmegamenu_widget-2" class="widget sidebarwidget "> <div class="dcjq-vertical-mega-menu" id="dc_jqverticalmegamenu_widget-2-item"> ...

The width of the Ion-slide is dynamically determined by the styling

After transitioning my Ionic 2 project to Ionic 3, I encountered issues with ion-slides which are affecting my app's functionality. Upon app loading, specific widths are being defined in the style tags on the slides, disrupting the intended styling. ...

Unable to delete the margin of Material-ui TextField

Having trouble removing the padding around material-ui's TextField component when using styled-components and inline styling. Any solutions to this issue? Interestingly, the inline width property is functioning correctly, unlike the styled-component w ...

Creating a loader for a specific component in Angular based on the view

Creating a loader for each component view is crucial when loading data from an API. Here is the current structure of my components within my <app-main></app-main>: <app-banner></app-banner> <app-data></app-data> <app ...

Assigning an argument of type `any` to a parameter of type `Observable<IComboboxItem[]>` can be considered risky

I have a piece of code that retrieves data from the backend server. Here is the code snippet: @Injectable() export class DictionariesDatasourceFacadeService { public invoiceTemplate: IDataSource<IComboboxItem>; public replacedLegalEntity: IData ...

When applying styles in Polymer, it's important to take into account the width and height

Having trouble setting the width of elements within container elements in Polymer. Here's a simple example that illustrates the issue: <!doctype html> <html> <head> <base href="https://polygit.org/polymer+:master/webcomponent ...

HTML links remain enclosed in a box even after the code has been finalized

Hey there, I have written this code and for some reason, every link shared after it is displaying with a black background. I'm new to coding and can't seem to figure out what I'm doing wrong. Any help would be greatly appreciated. a:link, ...

Masonry is limited to displaying a single column at a time

Struggling to make masonry work for the first time, as it is only displaying as a single column. Being more of a designer than a developer, it's possible that I'm overlooking something. Here is the code snippet I'm using: <body> ...

Revolving mechanism within React.js

I am currently developing a lottery application using React.js that features a spinning wheel in SVG format. Users can spin the wheel and it smoothly stops at a random position generated by my application. https://i.stack.imgur.com/I7oFb.png To use the w ...

Loading compact Angular Modules in modules loaded lazily

After developing a module in Angular known as CustomCoreModule, it has gradually expanded over time and resulted in performance issues, leading to the app becoming non-modular and difficult to maintain. To address this issue, I have decided to split the l ...

Arrangement of items in a grid featuring a row of three items, each with an automatic width

I'm facing challenges with achieving a specific layout: https://i.sstatic.net/a5ETh.png https://i.sstatic.net/I7fuS.png My goal is to have the left and right elements automatically adjust their width to cover all the empty space on either side of t ...

What is the rationale behind using :: before display: inline-block in Angular Material MDC's mat-mdc-form-field-error-wrapper, causing substantial padding?

I recently made the switch from Angular Material to Angular Material MDC in preparation for upgrading to Angular 17 from version 15. However, I've noticed that some styles are now broken. One issue I'm facing is a significant padding between the ...

Angular 2 ngx-modal: A User-Friendly Modal Component

I have encountered an issue while trying to implement a modal form in my Angular application. Even though my code seems correct and I have installed ngx-modal as well as imported the ModalModule in my app.module.ts, the modal form is not responding. Any ...

Ensure that only valid numbers can be inputted into an HTML number type field

My input number is as follows: <input type="number" id="quantity" name="quantity" (change)="firstRangePointChanged($event)" > I need to ensure that users cannot input invalid values like --99 (--) instead of ...

What is the best strategy for managing pagination when dealing with a large number of pages?

Up until now, I have understood that pagination only links different pages together. This works fine when dealing with a limited number of pages or posts to display. However, what if I have 30 or more pages to paginate? Wouldn't it be impractical to c ...

How do I extract a specific property from an array of objects and assign it to a new array in Typescript 2?

I've got this TypeScript 2 "model" that looks like this: export class MyModel { myProperty1: string; myProperty2: string; ... } In addition to the model, I have another class defined as follows: // Imports excluded for brevity @Component . ...

Use the toggle function in pure JavaScript to apply it only to the element that has been clicked

In this HTML code snippet, I am displaying data in a list format with nested subcategories. Each category is displayed as a clickable parent menu item. When clicked, the corresponding subcategories should be toggled to show or hide. <ul id="menu"&g ...

Trouble arises when selecting shapes in Angular 6 with FabricJS

Currently, I am experimenting with fabricjs and drawing different shapes. Interestingly, when I draw the shapes, they appear accurately on the canvas. However, when I try to switch to selection mode, I encounter an issue where I am unable to select the ind ...