How to eliminate the border/margin on the ::after CSS pseudo element

Is there a way to remove the orange border around the ::after CSS pseudo-element, similar to what I have demonstrated in my fiddle linked below?

http://jsfiddle.net/53ekh8ps/

#login_table tr:nth-child(n+2):nth-child(-n+4) td:first-child, #login_table tr:nth-child(2) td:nth-child(2) {
    background:orange;
}

#login_table tr:nth-child(2) td:nth-child(2)::after {
    content:"";
    display:block;
    height:100%;
    background:black;
    width:100%;
    border-top-left-radius: 25px;
}

Answer №1

To ensure proper formatting, make sure to include padding: 0 in the CSS for

#login_table tr:nth-child(2) td:nth-child(2)
:

body,
html {
  width: 100%;
  height: 100%;
  background: black;
}

#login_table {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  margin: auto;
  width: 30%;
  height: 50%;
  font-size: 50%;
}

#login_table tr:first-child td,
#login_table tr:last-child td {
  height: 10%;
  background: red;
}

#login_table tr:nth-child(n+2):nth-child(-n+4) td:first-child,
#login_table tr:nth-child(2) td:nth-child(2) {
  background: orange;
}

#login_table tr:nth-child(2) td:nth-child(2)::after {
  content: "";
  display: block;
  height: 100%;
  background: black;
  width: 100%;
  border-top-left-radius: 25px;
}

#login_table tr:nth-child(2) td:nth-child(2) {
  padding: 0;
}
<table id="login_table">
  <tr>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
  </tr>
</table>

For a live demonstration, click here.

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

Is there a way to restrict the orientation of a UIWebView using JavaScript or HTML?

Currently, I am working on HTML content for an iPad application. The challenge at hand is locking the UIWebView's content to portrait mode. Despite having already submitted the app to Apple, I have only come across a solution in this question, which s ...

I wish to substitute a form field with a different one once the value of another field matches a specific condition

The issue I'm facing is that the field disappears once "US" is chosen and does not revert back to the options when another choice is made. teacher_signup.html {% block content %} <h2>Sign Up As Teacher</h2> <form method="post> ...

Is there a way to ensure that the font-awesome icon occupies the entire space within its parent container?

It is evident that the thumbs are extending beyond their parent container, resulting in an unsatisfactory UI layout. The desired outcome should have the thumbs properly aligned within the parent container. Attempts to adjust margins or switch to a FLEX la ...

The Jekyll _post doesn't apply the css styles when the site is generated into the _site directory

After applying CSS to my posts in the _post directory and using bundle exec jekyll serve, everything looks great. However, when I try to build the Jekyll site with bundle exec jekyll build, the CSS does not get applied to the posts in _post anymore. Strang ...

The fonts are not appearing consistently across the display

I'm experiencing an issue on my website where some elements display perfectly, while others of the same font appear grainy and choppy. Despite specifying the style in the same way, I can't seem to figure out why this inconsistency is happening. ...

Choose all immediate parent items on the list in the mmenu

Currently, I am working on a project and looking to incorporate the jQuery plugin mmenu (). Despite making some customizations to suit my requirements, I am facing a dilemma. In mmenu, clicking on a list entry navigates to the specified href and marks the ...

When using Ruby and Rack on Heroku to serve a static site, the CSS styling may not be

Trying to deploy a static site consisting of HTML, CSS, font, and image files with Ruby Rack has been a bit challenging. While the HTML displays perfectly in Chrome when running it locally, the CSS assets do not seem to be loading or being applied to the H ...

Display duplicated options with Bootstrap selectpicker and organize them into optgroups

I have encountered an issue while trying to create a selectpicker using Bootstrap 5 with optgroups. The problem is that all option elements under each optgroup are identical and do not match the HTML structure I have defined in my file. This inconsistency ...

Transmitting an array of HTML form data to JSP/Servlet

My background is in PHP, where form data with names ending in square brackets are automatically interpreted as arrays. For example: <input type="text" name="car[0]" /> <input type="text" name="car[1]" /> <input type="text" name="car[3]" /&g ...

Can TypeScript be imported into HTML to set a color value or modify a color value from HTML using TypeScript?

I've been working on this code for a couple of days now. Utilizing Angular to develop a web application, I am trying to change the color of certain numbers when they reach a specific value. For example, if num > 45 then color = green, otherwise col ...

What is the process for displaying the current bitcoin price on an HTML page using API integration?

I'm looking to develop an application that can display the current Bitcoin price by fetching data from the API at . I want to showcase this information within an h2 element. Any suggestions on how I could achieve this? Thank you in advance. const e ...

When submitting a form with the jQueryForm plugin, take action on the form by selecting it with `$(this)`

I have a situation where I have multiple forms on one page and am utilizing the jQuery Form plugin to manage them without having to reload the entire page. The issue arises when I need some sort of visual feedback to indicate whether the form submission wa ...

In Form view in Odoo, the field value appears on the following line when editing

When attempting to edit a value in the form view, I am experiencing an issue where the field's value is being pushed onto the next line. <div class="row"> <label string="Website" for="field_id" class="col- ...

Listening to audio on a mobile browser using an HTML audio element

What is the solution for the problem of playing audio on a mobile browser when it plays on a desktop browser but not on mobile? The code being used is: var audio = new Audio('sound.mp4') audio.play() ...

The inner HTML functionality in Angular 2 seems to be malfunctioning when dealing with HTML tags

I am facing an issue with an array that includes displayName with HTML tags: this.topicsList = [ {id: "173", name: "Discussion1", displayName: "Discussion1", status: 1}, {id: "174", name: "discussion123", displayName: "discussion123", status: 1}, {id: "19 ...

Creating a custom fav icon within a button with CSS styling

https://example.com/code-example Hey there, I'm attempting to replicate the button showcased in the code example above. However, I'm facing a challenge when trying to incorporate the stars without altering the existing script. Another issue is w ...

Tips for creating a responsive width for a column of Bootstrap 4 buttons

I am attempting to design a vertical column of buttons that adjust responsively. Despite my efforts, the buttons do not resize properly when the screen size changes. I have explored resources on how to address this issue in Bootstrap and tried adjusting th ...

Tips for changing the background color of a Qtextedit?

After experimenting with HTML, I discovered that using type bgcolor="#ffd814" will change the background color in textedit. But how can I achieve the same result using QAction and QColorDialog? This is the method I tried: void MainWindow::on_actionBackgr ...

Tips on creating a recursive function based on depth levels

Function in need of completion: public static function f($rows) { $str = '<ul>'; $level = 1; foreach($rows as $row) { if($row['section_level'] > $level) ...

Issue with AngularJS directive: setting ng-readonly variable to true doesn't function as expected

I recently developed a custom directive for input fields. To use it in HTML, you just need to include the following code snippet: <my-input class="input-text" type="number" ng-model="modelVariable" ng-readonly="false" /> With ...