Polygon-shaped divs in css?

Discussion in 'Web Design and Development' started by londonweb, Dec 15, 2006.

  1. londonweb macrumors 6502

    londonweb

    Joined:
    Sep 14, 2005
    Location:
    london
    #1
    Hi guys

    Was I dreaming, or did I read somewhere that it's possible to create a div (or maybe it was a clipping mask) that can be a shape other than a rectangle, ie. a polygon, in CSS? I'm sure I read it in one of my text books but I can't seem to find anything about it now.

    Basically what I want to do is have the text inside a div wrap to a triangular shape, instead of a rectangular one. I wonder if this is even possible?
     
  2. mnkeybsness macrumors 68030

    mnkeybsness

    Joined:
    Jun 25, 2001
    Location:
    Moneyapolis, Minnesota
    #2
    What are you smoking? That must be some good sh--.

    Well... you can fake it... Ragged Float Example.
     
  3. londonweb thread starter macrumors 6502

    londonweb

    Joined:
    Sep 14, 2005
    Location:
    london
    #3
    Haha, I think it was some sort of Dutch Over-Optimism serum. Thanks for the link.
     
  4. seanf macrumors 6502

    Joined:
    Aug 8, 2006
    Location:
    UK
    #4
    Are you thinking of Slants?

    Sean :)
     
  5. londonweb thread starter macrumors 6502

    londonweb

    Joined:
    Sep 14, 2005
    Location:
    london
    #5
    I wasn't thinking of that, although that's cool too. I'm racking my brains and I've got this vague memory of reading something about using an image file to create a clipping mask. Maybe it wasn't css, but php or something, or a combination of the two. If I remember what it was, I'll let you all know!

    In the meantime I'm going to use the curvalicious method to wrap my text.
     
  6. londonweb thread starter macrumors 6502

    londonweb

    Joined:
    Sep 14, 2005
    Location:
    london
    #6
    Perhaps I was thinking of this, although it has nothing to do with css.

    Another possibility is that I read something about the 'clip' css style, and how currently only the rectangle shape is available, although perhaps in css3, different shapes are planned...I don't know, stabbing in the dark now.
     
  7. radiantm3 macrumors 65816

    radiantm3

    Joined:
    Oct 16, 2005
    Location:
    San Jose, CA
    #7
    You were drunk one night reading a chapter on image maps from an old html book thinking it was about css.
     
  8. londonweb thread starter macrumors 6502

    londonweb

    Joined:
    Sep 14, 2005
    Location:
    london
    #8
    Very possible - just another rockin' Friday night.
     
  9. seanf macrumors 6502

    Joined:
    Aug 8, 2006
    Location:
    UK
    #9
    Doesn't sound exactly like you're describing, but there's also Mountaintop Corners.

    Sean :)
     
  10. Elvano macrumors newbie

    Joined:
    Feb 5, 2010
    #11
    I don't know about CSS.
    But I believe you might have mistaken it for the "Area shape" tag in HTML

    Code:
    <area shape="poly" coords="*,*,*,*,*,*" href="#" />
    I believe the Area Shape can only be used to place above an image and function as an invisible link. Nt sure, though.
     

Share This Page