Header Text over Image

只谈情不闲聊 提交于 2020-01-06 09:02:44

问题


I want my Header text (Events, Blog, About) to LAY ON TOP OF the "Images/Damask.png" image. Instead the image is displayed at the very top of the header with the text BELOW the image.

<header>

    <header>
    <img src="Images/Damask.png" width="100%" border="0" height="200" class="header">
        <a href="index.html" id= "logo">![enter image description here][1]
            <h1>J Barnes Events</h1>
            <h2>Indianapolis's Finest<h2>   
        </a>
        <nav>
            <ul>
                <li><a href="index.html" class="selected">Events</a></li>
                <li><a href="about.html">Blog</a></li>
                <li><a href="contact.html">About</a></li>
            </ul>
        </nav>
</header>

回答1:


Instead of separately adding an image, you can simply add the following CSS to your stylesheet and that would achieve what you're trying to do:

header {
     background-image: url('Images/Damask.png');
}


来源:https://stackoverflow.com/questions/26349049/header-text-over-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!