CSS:How to properly remove border using CSS when border-radius is used?
Asked Answered
H

4

20

I have a div styled like so: Jsfiddle

How can I remove all of the left hand side border, without the ugly curved radius?

Is it possible in CSS? Or is there a hack to do it? (or am I being too picky?)

Thanks Muchly,

Harley

Hall answered 12/7, 2012 at 15:55 Comment(0)
M
22

Is this what you are looking for?

border-radius: 0px 6px 6px 0px;
Maculate answered 12/7, 2012 at 15:58 Comment(1)
<blush><smacks-head> Oh yes! Why didn't I think of that? Sorted. Thanks.Hall
I
26
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;

This will override any border radius css.

Indusium answered 22/5, 2013 at 11:36 Comment(2)
Why 0px and not just 0?Twinberry
Note: 0 is unitless, so px is redundant. Should just be border-radius: 0;Beforetime
M
22

Is this what you are looking for?

border-radius: 0px 6px 6px 0px;
Maculate answered 12/7, 2012 at 15:58 Comment(1)
<blush><smacks-head> Oh yes! Why didn't I think of that? Sorted. Thanks.Hall
I
0

TIL

border-top-left-radius: 8px 8px;

is a thing

Inge answered 9/2 at 22:30 Comment(0)
B
-3

if you want to remove the border just use : border: 0px;

Benediction answered 12/7, 2012 at 15:59 Comment(3)
Thanks for the help, but I didn't want to remove the whole border.Hall
Not true, you can have border radius with no or transparent border.Goglet
Note: 0 is unitless, so px is redundant. can just be border: 0;Beforetime

© 2022 - 2024 — McMap. All rights reserved.