By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,046 Members | 2,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,046 IT Pros & Developers. It's quick & easy.

How to shape div tag in a following shape? (see image attachment)

ilya Kraft
100+
P: 134
Hello,

I need to shape a div tag in the shape like in this image:



because I want to have a hover event when div with this shape changes color. I know how to make this shape from 2 divs, but then hover event would only work on one of them and I need whole div to change color.

Thnx ))))
Attached Images
File Type: jpg div.jpg (29.5 KB, 8157 views)
Jun 7 '11 #1

✓ answered by drhowarddrfine

div elements are square and there is no way around that, except for rounded corners. I just made a funny. :)

I once read an article where someone accomplished this with some trickery; probably overlapping elements. Just a week ago, Adobe had their CSS Regions introduced that CAN do that and much more but it only works in Webkit and it's very much in the draft stage.

Share this Question
Share on Google+
1 Reply


drhowarddrfine
Expert 5K+
P: 7,435
div elements are square and there is no way around that, except for rounded corners. I just made a funny. :)

I once read an article where someone accomplished this with some trickery; probably overlapping elements. Just a week ago, Adobe had their CSS Regions introduced that CAN do that and much more but it only works in Webkit and it's very much in the draft stage.
Jun 7 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.