Ivan
Ivan

Reputation: 64207

How to prevent line break before H3?

I am trying to use this solution to make a multilevel numbered list outline.

The problem is that I need top level list items to begin with H3 elements and what I get is something looking like

1
My heading
1.1 My subelement

While, needless to say, what I want is

1 My heading
1.1 My subelement

I have checked - the problem is in H3 - it prepends itself with line break naturally. How do I disable this?

Upvotes: 2

Views: 3216

Answers (1)

j08691
j08691

Reputation: 207901

Heading elements (all of them) are block level by default. Use CSS to change the display to inline or inline-block.

h3 {
    display:inline;
}

Upvotes: 9

Related Questions