How to align an image side by side with a heading element?

后端 未结 2 2023
没有蜡笔的小新
没有蜡笔的小新 2021-01-13 20:48

below is my code:

System Configuration

I want to make

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-13 20:53

    There are soooo many ways to do this.

    Some of these methods are really gross and should be avoided, but I thought it would be interesting to list them out for the sake of illustration.

    Use the align property on the .

    System Configuration

    Nest the inside the

    .

    System Configuration

    Use an inline style to float the

    .

    System Configuration

    Use an inline style to float the .

    System Configuration

    Use inline styles to make both and

    display as inline elements.

    System Configuration

    Use inline styles to make both and

    display as inline-block elements.

    System Configuration

    Use css background-image property and some padding.

    The following example assumes you have a 16x16 px icon image.

    System Configuration

    And many more...

提交回复
热议问题