1

Is it possible to achieve this slanted sidebar layout with CSS? The right side would be the main content where I assume the slanted sidebar layout could overlap the extra. Thanks for reading!

angle layout

blkedy
  • 1,243
  • 2
  • 13
  • 19
  • possible duplicate of [Wrapping text around non-rectangular shapes css/html](http://stackoverflow.com/questions/21079382/wrapping-text-around-non-rectangular-shapes-css-html) – derekerdmann Jul 15 '14 at 04:32

2 Answers2

0

Try something like this..

#shape {
    border-top: 100px solid green;
    border-right: 20px solid transparent;
    height: 0;
    width: 100px;
}

Fiddle: http://jsfiddle.net/3wLJj/1/

more info: http://css-tricks.com/examples/ShapesOfCSS/

Deepu Sasidharan
  • 5,193
  • 10
  • 40
  • 97
0

If you are going to add some text, or elements inside the green div, it is better to do it this way than creating only a shape.

Fiddle

.main{
    width:60%;
    background:green;
    height:400px;
    position:relative;
    color:white;
}
.main:after{
    content:'';
    position:absolute;
    right:-40px;
    border-top: 400px solid green;
    border-right: 40px solid transparent;
    
}
.side{
    margin-left:10%;
    width:30%;
}
Community
  • 1
  • 1
Adrian Enriquez
  • 8,175
  • 7
  • 45
  • 64