<br>
won't let me to display 3 buttons inline, so i need to disable it inside div, and I can't just delete them, they are automatically there.
I have:
<div style="display:block"> <p>Some text</p> <br> <p>Some text</p> <br> </div>
and I want:
<div style="display:block"> Some text Some text </div>
More info
I do not want to have mystyle.css file. Of course I know that way of disabling it.
I asked how to add to divs style this br { display: none; }
if it is possible.
Solution:
<p>
tags without removing content inside.<br>
directly by divs style, so I make it this way:<style type="text/css"> .mydiv { display: block; width: 100%; height: 10px; } .mydiv br { display: none; } </style> <div class="mydiv"> Some text Some text </div>
http://jsfiddle.net/cGT4E/
Solution: It is not possible to remove just <p> tags without removing content inside.
By setting the text-decoration to none to remove the underline from anchor tag. Syntax: text-decoration: none; Example 1: This example sets the text-decoration property to none.
If you find yourself using more than one to get extra spacing then you should be using css instead. A common use of the <br> tag is when inserting something like an address. Try not to use them for presentation, if you need more than a single line break then use margin or padding in css. +1 for the good examples!
You could alter your CSS to render them less obtrusively, e.g.
div p, div br { display: inline; }
http://jsfiddle.net/zG9Ax/
or - as my commenter points out:
div br { display: none; }
but then to achieve the example of what you want, you'll need to trim the p
down, so:
div br { display: none; } div p { padding: 0; margin: 0; }
http://jsfiddle.net/zG9Ax/1
or hide any br that follows the p tag, which are obviously not wanted
p + br { display: none; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With