html - How to prevent <H1>'s from taking up more width than they need -


If I have a & lt; H1 & gt; heading, its width is set to 100% by default. Is there a way to ensure that its width is probably the smallest value set? I need to do this with special CSS content borders.

You can assign it to display: inline , any text element ( H1 will default to display: block ). For example - float: left are other methods, but I get one with the simplest and least side effects.

Note that you may have to add


Comments

Popular posts from this blog

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -

tsql - Correct sql/hql query (aggregate in where clause) -