michaellindahl
michaellindahl

Reputation: 2052

Use CSS3 Shapes as centered backgrounds

I want to have my UL have half triangles as their background. I would really like to use only CSS shapes for this project. I have used some code form this site, however I need some additional help. I am unable to have the text centered in the shapes. What can I adjust to accomplish this?

Code: http://jsfiddle.net/akAh9/

Upvotes: 0

Views: 133

Answers (1)

raina77ow
raina77ow

Reputation: 106375

Swapping

right: 6em;

... for ...

right: 50%;

... seems to do the trick (with this you effectively move the lower point of that CSS triangle to the middle of the .diamond element).

Upvotes: 2

Related Questions