Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-30-2012, 04:16 AM   PM User | #1
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
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..
Sammy12 is offline   Reply With Quote
Old 01-30-2012, 07:15 AM   PM User | #2
nameno
New Coder

 
Join Date: Jan 2012
Location: Romania
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
nameno is an unknown quantity at this point
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>
nameno is offline   Reply With Quote
Old 01-30-2012, 11:12 PM   PM User | #3
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
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
Sammy12 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:41 AM.


Advertisement
Log in to turn off these ads.