2

I would like to break the line automatically before a <strong> tag begins. I'd try a couple of things, but can't find out how to do so.

I tried:

strong, b {font-weight: bolder;clear:both;display:block;}

and

strong:before, b:before {clear:both;display:block;height:1%}
strong, b {font-weight: bolder;}

Is there any solution for this?

animuson
  • 53,861
  • 28
  • 137
  • 147
Maarten Klok
  • 215
  • 3
  • 20
  • You can't apply clear to inline elements, it will automatically revert to "inline". – animuson Nov 17 '11 at 22:29
  • `display: block;` is not inline. The problem is that the content is null (different than empty) within the block so it just won't even display the `:before` elements. Adding `content: ""` is all he needs. – Cory Danielson Nov 17 '11 at 22:34

2 Answers2

2

Here

strong:before {
    content: "";
    display: table;
    clear: both;
    zoom: 1.0;
}

http://jsfiddle.net/dxQBy/8/

I learned about this a few weeks ago after running across A new micro clearfix hack - Nicholas Gallagher

Cory Danielson
  • 14,314
  • 3
  • 44
  • 51
0

are you not looking for something like this?

strong, b { 
    font-weight: bold;
    display:block;
    clear: both;
}

http://jsfiddle.net/seany789/dxQBy/4/

okcoker
  • 1,329
  • 9
  • 16