cecilia 0 Posted March 13, 2006 Report Share Posted March 13, 2006 I´m reading the CSS tutorial and I just read about the :before and :after Pseudo-elements. Can somebody tell me when I could need these elements?Because I can´t guess for what I´d want to add some sound or something after or before a i.e. h1 ocurrs.Thanks! Quote Link to post Share on other sites
F-Man 0 Posted March 13, 2006 Report Share Posted March 13, 2006 Well let's say you wanted your headings to be in bracket [like this]. You could do:h1:before { content: "["; }h1:after { content: "]"; }Also you can decide to disable or enable quotation marks around quotes like this:q:before { content: open-quote; }q:after { content: close-quote; }You can also use p:after { content: url(image.gif); } to place some signature image at the end of a paragraph, and so on. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.