Enquire

HTML Headings with inline-block and line break

CSS Tips & Tricks

You’re trying to achieve this:

Hello

Bye bye

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries.

But you’re achieving this:

Hello

Bye bye

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book www.buyessaysfast.org. It has survived not only five centuries.

or something like this…

Hello

Bye bye

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries.

It’s surprisingly a common dilemma, but with a very simple solution.

1
2
3
4
5
6
7
h1, h2{
 display:table;
 background:red;
 padding:5px 20px;
 clear:both;
 margin-bottom:2px;
}

The key is to use display:table

Comments

Leave a reply

Your email address will not be published. Required fields are marked *

X