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

  • SEARCH
  • Home
  • 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 8095909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:17:38+00:00 2026-06-05T21:17:38+00:00

In this fiddle http://jsfiddle.net/dAHqe/2/ I’ve created examples for the 2 main uses (that I’ve

  • 0

In this fiddle http://jsfiddle.net/dAHqe/2/ I’ve created examples for the 2 main uses (that I’ve seen) of border-radius for lists.

  1. Apply border-radius (and therefore background-color) to the container (a div or a ul).
  2. Apply border-radius (and therefore background-color) to the first and last content items (lis or nested divs) via the :first-child and :last-child pseudo-classes.

At first glance, it looks like the first way (applying it to the container) is much more concise, yet I see the second way all the time.

Is there any good reason (i.e., scalability) to use the second way?

Update: This is for a mobile app, so I won’t need the :hover pseudo-class.

  • 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-05T21:17:40+00:00Added an answer on June 5, 2026 at 9:17 pm

    Personally, in the examples you’ve given, I’d always just go with the simple option and put it on the container.

    However, reasons for doing it the other way:

    • Maybe you don’t have a container, and you can’t change the code to add one.

    • You have some reason to want the flexibility to change individual list items in a way that having a single container wouldn’t work. eg Maybe you want to make them semi-opaque on hover?

    • You have to work around an awkward HTML structure. I had a case like this a while back where I had to add rounded corners to cells in a complex table. The cells in question were sub-heading rows and columns in a bigger table, but the way it all fitted together meant I had to put the rounded corners individually into separate cells. It was fiddly and awkward but ended up looking how they wanted it.

    • The coder doesn’t know CSS all that well and simply cribs it from somewhere else that does it that way.

    Those are the only reasons I can think of. But I suspect most cases fall into one or other of those.

    Hope that helps.

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

Sidebar

Related Questions

Referencing this Fiddle ( http://jsfiddle.net/j5uGN ), how can I toggle a clicked image's border
I have created a fiddle to test this : http://jsfiddle.net/Ninjanoel/X6ShS/ which works fine :(
I have this Fiddle: http://jsfiddle.net/GSA5R/2/ Whereby i use the border property to create the
In this fiddle http://jsfiddle.net/SySRb/40/ , I created an array with two elements, #f-ONE and
On this fiddle http://jsfiddle.net/mjmitche/qVdEy/6/ , you can see that the alignment of the text
I have this fiddle : http://jsfiddle.net/XjeCf/1/ that works like I want and this one
look at this fiddle: http://jsfiddle.net/ugxNK/ I want that the first list element is in
Please have a look at this fiddle: http://jsfiddle.net/mrmartineau/53fkV/embedded/result/ The intended outcome is that when
Please look at this fiddle: http://jsfiddle.net/dyv88/16/ On IE7, if I put width: 100% on
Given this little fiddle: http://jsfiddle.net/5Sw3h/8/ I have a navigation panel to the left, 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.