English 中文(简体)
为什么赢得背景形象?
原标题:Why won t background image display?

不过,我试图为网站的负责人展示一个背景形象,但这个形象却获得了展示。 该守则是:

传真:

<!DOCTYPE html>
<html>
<head>
    <title>Matt Hayward s Blog</title>
    <link rel="stylesheet" type="text/css" href="styles/main.css">
</head>
<body>
    <div id="wrapper">
        <div id="header">

        </div> <!-- header -->
        <div id="navbar">
            <ul>

            </ul>
        </div> <!-- navbar -->
        <div id="maincontent">

        </div> <!-- maincontent -->
        <div id="rightmenu">

        </div> <!-- rightmenu -->
    </div> <!-- wrapper -->
    <div id="footer">

    </div> <!-- footer -->
</body>
</html>

缩略语 div:

#header
{
    background: #fff url(header.png) no-repeat;
    width: 960px;
    height: 121px;
}

这是我在100年前用过的,从未出现过显示背景形象的问题,因此我完全相信为什么不工作。 如果任何人能够提供帮助,那将是巨大的。

我尝试了<代码>url(>>,既使用也无单一报价,但两者兼有。

(我知道以前曾问过类似问题,我看着其中几个问题,但答案没有解决我的问题)。)

最佳回答

你的法典是好的。 • 确保领导。 青.存在于轮体内。

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

Drop down background url in Safari Issue

selectBox.selectCSS { background: url(/Images/replacementSelectBackground.png) top left no-repeat height:auto; } I have an issue in Safari only where the image is not rendering on top ...

CSS specific for Safari

How do you target specifically safari in css with styles?

Aligning textarea in a form

Ive used the following css code to align my form elements: form { position:relative; } form input { position:absolute; left:11em; } However, the textarea element is not aligned correctly with the ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

CSS problem with page footer

I have defined my page footer in the css file as: #footer { position: absolute; height: 50px; text-align: center; background: #66CCCC; bottom: 0px; left: 0px; width: 100%; height: ...

热门标签