html - How to disable <br> tags inside <div> by css? -


<br> won't let me display 3 buttons inline, need disable inside div, , can't delete them, automatically there.

i have:

<div style="display:block"> <p>some text</p> <br> <p>some text</p> <br> </div> 

and want:

<div style="display:block"> text text </div> 

more info

i not want have mystyle.css file. of course know way of disabling it.

i asked how add divs style br { display: none; } if possible.

solution:

  1. it not possible remove <p> tags without removing content inside.
  2. it not possible hide <br> directly divs style, make way:
<style type="text/css"> .mydiv { display: block; width: 100%; height: 10px; } .mydiv br { display: none; } </style>  <div class="mydiv"> text text </div> 

http://jsfiddle.net/cgt4e/

you alter css render them less obtrusively, e.g.

div p, div br {     display: inline; } 

http://jsfiddle.net/zg9ax/

or - commenter points out:

div br {     display: none; } 

but achieve example of want, you'll need trim p down, so:

div br {     display: none; } div p {     padding: 0;     margin: 0; } 

http://jsfiddle.net/zg9ax/1


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -