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..

    Jquery: Show/hide menu with single button

    How does one make one table column header taller than the rest?

    How to align TH Header with TD in TBody

    How to create a div with a diagonal (or angled) top line

    How to change when Jquery edits my CSS upon reaching an anchor point?

    How can I keep the hovered menu item open so I can edit it's style with firebug?

    show two texts for one mouseOver event

    How to set image as a button in HTML & CSS?

    How to set columns 100% height within body using css

    Bootstrap - How to keep the natural container layout while fixing the container to the bottom?

    css - how to hide href link nested inside a div?

    How can I place HTML in a JavaScript string and have it validate?

    How to remove dot '.' from CSS list-style:decimal [duplicate]

    How to give cross browser transparency to element's background only?

    Div inside how to call class in css?

    How to set size of SVG image in :before pseudo-class?

    Chrome (webkit?) not displaying images correctly in a slideshow

    How stop elements from moving

    How can I caption an image inside a paragraph

    ?

    Pesudo Class and Css Role how to apply theme

    How to share js/css/images across Rails applications?

    how to link stylesheet in css

    How does Grails process static files without resources plugin?

    How to change the color render setting for anchor in a css file?

    How to wrap text in table cell without wrapping child elements

    how to make an interactive uploader like gmail and facebook have?

    How can I make a fixed div JUMP when scrolling?

    How do I add colored corners to a background image?

    How to refer css style from another?

    Devtools audit shows unwanted/injected css rules