Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS sign /Banner

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #38848
    infinite
    Member

    hi

    I am trying to create a Pure CSS Banner which would be shaped like a road sign – a rectangle going to a point(triangle)
    i have a Photoshop version but wish to make the site responsive so would be best in CSS .

    An example of what i wish to create in CSS can be seen here: https://www.dropbox.com/s/9l2eo1rqmegji45/stag.png

    Any ideas on the best way to achieve such a shape?

    #105795
    HoughtonA
    Participant

    Here’s a quickie. I just adjusted the css from the text bubble in this, which you might find interesting. :)

    #105806
    infinite
    Member

    @ HoughtonA
    Thanks that’s a great start, i had a play around with CSS shapes earlier today but couldn’t get it right.
    thanks that just the job

    #105808
    infinite
    Member

    i have changed it slightly
    updated sign
    i have applied a shadow but its only around the rectangle?
    – can you explain the div: before
    thanks
    darren

    #105809
    HoughtonA
    Participant

    Yeah, the before element is a psuedo element. It’s a part of the div that it’s selecting, but it’s not going to inherit some of the div’s css (and it’s not in the dom, so you can’t really mess with it in javascript).

    EDIT: Your link works now. Yeah, you’ll need to change how the before element is displayed in order to get the shadow to look right. (right now, adding the shadow makes it a box (give me a minute))

    #105793
    infinite
    Member

    cheers
    i have altered it to include the stitch effect: http://codepen.io/pen/10237/5

    #105810
    HoughtonA
    Participant

    Here it is with updated shadows. This will only work in newer browsers, mind you.

    #105811
    infinite
    Member

    thanks
    that great, i can see what you have done now, is transform not supported in other browsers yet?

    #105817
    HoughtonA
    Participant

    http://caniuse.com/#search=transform :)

    It’s css3 stuff. Old browsers and some mobile devices won’t support it. Internet Explorers 8 and under, for example.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘CSS’ is closed to new topics and replies.