Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts

    CSS Parallelogram

    Hi I was wondering how I could make something like this in css. The user will be able to customize the color, border, and transparency so I'm looking to do this completely with css



    anyone got any cool methods? My original idea was to use 2 css triangles for the ends, but that would take a lot of css :\



    http://css-tricks.com/snippets/css/css-triangle/

    any other ideas? before you go all -webkit-transform on me, I would like IE6 kind of support
    http://css-tricks.com/examples/ShapesOfCSS/
    Last edited by Sammy12; 01-30-2012 at 04:27 AM.

  • #2
    New Coder
    Join Date
    Jan 2012
    Location
    Romania
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try playing around with this:


    <html>
    <head>
    <style type="text/css">
    div
    {
    width:100px;
    height:75px;
    background-color:red;
    border:1px solid black;
    }
    div#div2
    {
    transform:skew(-10deg,-20deg);
    -ms-transform:skew(-10deg,-10deg); /* IE 9 */
    -moz-transform:skew(-10deg,-10deg); /* Firefox */
    -webkit-transform:skew(-10deg,-10deg); /* Safari and Chrome */
    -o-transform:skew(-10deg,-10deg); /* Opera */
    }
    </style>
    </head>
    <body>

    <div>Hello. This is a DIV element.</div>
    <br><br>
    <div id="div2">Hello. This is a DIV element.</div>

    </body>
    </html>

  • #3
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    Quote Originally Posted by Sammy12 View Post
    any other ideas? before you go all -webkit-transform on me, I would like IE6 kind of support
    http://css-tricks.com/examples/ShapesOfCSS/
    you literally googled that


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •