html - How to make another tag behave exactly like the pre tag using CSS? -


i want <code> tags behave <pre> tags. problem line break @ beginning of block. how rid of line break?

this shows mean ...

http://jsfiddle.net/6nmpn/

this appears browser bug. see e.g. this page. sgml (and html) says browser needs remove newline following opening tag, or preceding closing tag. appears browsers (note: not all) adhere requirement on <pre> tag , not on other tags such <code> tag.

so, appears there's not can it. possible fix can think of using xhtml strict. that's xml, not sgml. perhaps browsers treat elements equally then. i'm not sure, it's idea.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -