如何将多个链接放在同一行上? (HTML5) [英] How do I put multiple links on the same line? (HTML5)

查看:1486
本文介绍了如何将多个链接放在同一行上? (HTML5)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将多个链接放在同一行上,这样我就可以拥有整个链接栏,我已经尝试过了:

I'm trying to put multiple links on the same line so I can have a whole bar of links, I've tried this:

<a href="website_homepage.htm"><h2 style="font-family:tempus sans itc;">Home</h2></a> <a     href="website_hills.htm"><h2 style="font-family:tempus sans itc;">Hills Pupil Tailored Website</h2></a>

但是当我测试看是否有效时,这两个链接位于单独的行上,有人知道我如何才能将它们放在同一行上吗?

but when I test to see if it works, these two links are on seperate lines, does anyone know how I can get them on the same line?

推荐答案

只需添加:

h2{
    display: inline;
}

对于您的CSS,问题将得到解决.

To your CSS and the problem will be solved.

这篇关于如何将多个链接放在同一行上? (HTML5)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆