How to create straight corners with CSS border-radius? [duplicate]


Tags: css

Problem :

This question already has an answer here:

I am trying to create this kind of straight corner with the CSS border-radius property:

enter image description here

But so far I am only getting the basic CSS rounded corners. Does anyone have a solution for this? I am trying not to use an image to create the effect.

Thanks in advance.



Solution :

Well, border-radius will always create a rounded Edge (or have you ever seen a Polygon with a radius?). I would create a scaleable svg image with the border (and transparency in the middle, in order to let you switch the background color in your css) and use it as the background of the box.

EDIT: Well, maybe look at the other question that is linked here. Those answers are better than mine.


    CSS Howto..

    How to display Bootstrap button label vertically using CSS?

    How to make width of element full width of screen and not parent css

    How to use vertical menus in HTML and css?

    CSS How to hide current child menu items when hovering over parent's sibling items without javascript

    How to re-use .less and generated CSS across projects?

    How to stack two UL classes directly on top of one another in the middle of the page

    How would I set this up? [closed]

    In CSS, how to make the colored background be at least 50% of pagewidth and at most 90%, and as wide as necessary?

    how to create a image slider with help of only HTML and CSS?

    How to use more times css transform property?

    How to prevent CSS hover style from firing unless hover time reached as defined in jQuery routine?

    how to put inline image css in ghost-blog?

    How can I make a fix positioned menu bar?

    Javascript: How do I get the id of a clicked link and then style it in css

    how to pass jquery variable value into css property value?

    How to fix the css red notification bubble

    How to copy external CSS and JavaScript in XSLT

    Div's don't show up

    How to make footer not overlap and positioned properly?

    How to control new line position after CSS display inline-block break

    How to properly align rows with bootstrap

    How to add overflow : hidden and max widths on images

    how to align div's horizontally in CSS

    how to effect td on fixed table layout

    CSS: How to align table data

    How to create radio button as buttons?

    How to add a space between paragraphs when using css reset? [closed]

    How do i put text under an img icon in a menu?

    looking for a good explanation on how html gets rendered and how css effects it [closed]

    How to automatically scroll when div expands at bottom of page?