Alex Rivera | Logout

Can you target <br /> with css?

Asked 2009-05-22T18:20:13.557
199

Is it possible to target the line-break <br/> tag with CSS?

I would like to have a 1px dashed line every time there is a line-break. I am customising a site with my own CSS and cannot change the set HTML, otherwise I would use some other way.

I don't think it is possible but maybe there is a way someone knows about.

Edit
Report

1 Answer

71

Try the following, I put it together using Update 2 from another answer with high votes, and it worked perfectly for me:

br
{   content: "A" !important;
    display: block !important;
    margin-bottom: 1.5em !important;
}
answered 2012-04-19T22:18:55.197

Your Answer