I just ran across a problem where I needed to ignore/disable <br> tags. Here’s the situation – I use CSS to spice up my <code> tags in this blog, but when I add new entries it adds a <br /> after every line feed; this normally wouldn’t be a problem but I use ‘white-space: pre’ to keep my code indents. ‘white-space: pre’ is like using a <pre> tag for your element, so both line feeds and <br /> tags are converted to new lines. After searching on the net for a bit I realized that people are over complicating the answer – just change the line-height to 0px:
line-height: 0px;
}
« Storing IP Addresses in MySQL with PHP Drop Down Flash Menu in Pure Actionscript »


Or even
<code>code br{ display:none; }</code>
Thanks! It helped for me. But
doesn’t work at my page.
This isn't working for me. In any browser I try, I have a new line as usual. I am, however, not using the code in a pre tag or set the whitespace to pre in the stylesheet, I'm just trying to remove a single newline.
Matthew, have you tried "me not him"s suggestion?:
br{ display:none; }
Actually the first comment worked for me pretty well. only thing is that the code must be the id value of the div container where you want to remove the line break. Thanks for the help.