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
Post a Comment