The border-radius property for form fields does not seem to be applying correctly to the final element

I am trying to apply a border radius of 50px to the right side of the last field, but it doesn't seem to work. Can anyone help?

/*
 * Search
 */
#top {
  max-width: 1182px;
}
  
/* Rest of CSS code here... */
<!-- HTML code snippet here -->

Answer №1

There seems to be an issue with your code because the last child in your .form-search does not have a bordered class. If you remove (just for demonstration purposes) the last form-group class (which is the button), you should see the expected result.

To address this, you can modify your code as follows (targeting the select element of the second last child using

#top .form-search .form-group.bordered:nth-last-child(2) select
):

/*
 * Search
 */
#top {
  max-width: 1182px;
}

#top .search-wrapper {
  display: flex;
  align-items: center;
}

#top .search-wrapper .text {
  margin-right: 20px;
  white-space: nowrap;
}

#top .form-search {
  display: flex;
  justify-content: stretch;
  width: 100%;
  margin: 0;
}

#top .form-search .form-group {
  position: relative;
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 0;
}

/* Other CSS rules removed for brevity */

<div id="top">
  <div class="search-wrapper">
    <div class="text">Search position by</div>

    <!-- Form elements here -->

  </div>
</div>

Answer №2

Make sure to substitute ":last-child" with ":nth-child(5)"

#main .search-bar .form-group.highlighted:nth- 
child(5) select,
#main .search-bar .form-group.highlighted:last-child 
input {
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
}

Answer №3

Include the following CSS snippet in your script

select#years-of-experience {
border-radius: 0 7px 7px 0 !important;}

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

Alternative Options for Playing Audio in Internet Explorer 8

I'm in the process of setting up a button that can both play and pause audio with a simple click. While this functionality is working smoothly in modern browsers like Google Chrome, I am facing compatibility issues with IE 8. Even after attempting to ...

What could be causing the overflow of my <table> data from its parent <div> container in Bootstrap?

Currently, I am trying to utilize angular in conjunction with bootstrap to present my data. I have mock data stored within a component and displayed in the html file of that component. However, I am facing an issue where when the table expands in size, it ...

Tips for CSS and jQuery: Show link when hovered over and switch the visibility of a content div

I'm facing an issue with a link in the horizontal navigation bar. When a user hovers over it, I want another div to slide down just below it. The problem is that using the .toggle method doesn't work as expected. It continuously toggles the div e ...

Incorporating an external JavaScript file into an AngularJS project

index.html: <!DOCTYPE html> <html> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"> </script> <script src="./assets/namesController.js"></script> <body ng-app="myApp"> < ...

Using Ajax and jQuery to dynamically insert an option into a datalist

I'm in the process of building a search box using Flask, MySQL, and ajax. I've managed to retrieve the search results in JSON format within the console, but now I want to dynamically add them to the options in my datalist element in the HTML. He ...

Improving the touch responsiveness of my website's navigation menu (drop-down style)

I am currently developing a small website that includes a simple drop down menu feature. When using a desktop, hovering over an item triggers the drop down list, which is straightforward. However, on touch screens, this functionality is not working properl ...

Utilizing custom template tags with script tags for componentization within Django applications

Currently working on a Django project with multiple apps. One of the main apps serves as the base, housing global elements like CSS, JS, and custom template tags (referred to as CTTs). I'm interested in creating CTTs that contain HTML and script tags ...

Enable the feature for users to upload images to a specific folder within the Chrome extension without the need for

I need to implement a feature in my Chrome extension that allows users to upload images directly to a specific folder named "upload" without needing a submit button. <form action="/upload"> <input type="file" name="myimages" accept="image/*"> ...

Align the inner div in the center of the outer div, even when the outer div does not

I'm attempting to make sure the tail of the speechbubble aligns with the center of the image, regardless of their respective heights. Essentially, I want the image to always be centered within the current height of the wrapper, similar to how the spee ...

Jssor Slider: Captions briefly overlap just as the slideshow begins to play

I am currently working on a slideshow with 3 caption-only slides. Here is the code snippet: <div id="sliderHeader_container" style="position: relative; width: 965px; height: 85px;"> <!-- Slides Container --> <div u="slides" style=" ...

Tips for reducing the border size to properly accommodate a div

I am wondering how to adjust the border size to fit the div containing a h5, hr, and two p elements? <div style="border: black 0.5px solid; align-self: start;"> <h5 style="margin-left: 450px; margin-top: 200px;">xxxx</h5> <hr w ...

Show the output of JQuery in the text input area

Can anyone help me figure out how to display the value of #response in an input field instead of a div? I've tried using the code below, but it didn't work: <div id="response"></div> I attempted to use an input field like this, ...

Target the last element of a specified type in CSS without selecting any of its sub

I have a main element with nested children, some of which share a common CSS class. My goal is to select the last child of the main element without selecting the last sub-child as well. I have attempted two methods so far: Using :last-child .some-cl ...

The collision function is currently not functioning properly, causing a hindrance in movement. There are no other codes restricting movement

const rightPressed = false; const leftPressed = false; const upPressed = false; const downPressed = false; const players = []; players[0] = new victim(1234); const arrayw = 50; const arrayh = 50; const canvas = document.getElementById("myCanvas"); const ...

Getting the entire data block in ReactJS: A step-by-step guide

I have encountered an issue with a component I created that only displays the value of block[0], rather than showing the entire block value. For instance, if I input: HI Stackoverflow It only shows "HI" and not the complete content of the field. Is th ...

How do I incorporate left, right, and top labels with Material-ui Toggle switches?

My goal is to create a unique toggle switch design with labels positioned on each side as well as on top. For example, I am working on a left/right switch. The desired output should resemble this:          Side Left [Toggle] Right Below is ...

How to Enhance Angular ui-router nested views with Resolve?

I have been working on creating a customized version of my Angular 1.4.12 application with nested views. The main purpose behind this customization is to accommodate sections within the app that require a header/content/footer structure, while others do no ...

Experiencing difficulties with positioning text beside an image

Hello everyone, I'm a first-time poster seeking some assistance. I'm currently tackling an assessment and am struggling with the final part. The task involves creating a picture card with an image at the top, a circular image to the side, and tex ...

Is it possible to show only a snippet of the title on the main blog page of WordPress

Seeking assistance in displaying a condensed version of a blog post's title on the blog's main page along with a thumbnail image. While I've come across several resources on showcasing post excerpts, I have yet to find information on trimmin ...

Modifying the font style and color of text within the table header - Material Table version 0.19.4

Recently, I began using React and Material UI but have encountered an issue with modifying the color and font of text in the table header. Despite attempting to override it, the default style remains unchanged. It has been mentioned that utilizing "heade ...