我最近编写了一些代码,其中有几个 jQuery UI 模式对话框。在这些模态对话框中的每一个中,我都不想要 jQuery 提供的默认标题栏,所以我create
在对话框代码的函数中使用了这行代码:
$(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar").css("display","none");
然后我只是以这种方式填充模态对话框的内容:
HTML
<div id="helpdialog" class="helpbox">
<header id="helptitle">Help</header>
<p id="helptext">
The aim of the game is to escape the maze by forming a correct sentence that ends on one of the edges of the grid.<br><br>
From each square you can only move to one of the highlighted squares. Choose the only word that can correctly follow the word in the square that you are in and click on it.Move one square at a time, forming a sentence, until you reach one of the edges of the grid or until it is impossible to extend your sentence further. Click on Submit.<br><br>
To undo your selections click on the squares you want to deselect in the reverse order to that in which you selected them (they will be numbered).<br><br>
If you click on Reveal, the sentence will be shown for two seconds, and then you'll be able to resume playing.<br><br>
In the Single player game find all of the sentences in the shortest time possible.
</p>
</div>
CSS
#helptitle {
height: 1.5em;
width: 100%;
background-color: #d9d3ed;
text-align: center;
font-size: 1.3em;
font-family: Dejavu, Verdana, Arial, sans-serif;
}
#helptext {
font-size: 0.9em;
padding: .5em;
font-weight: normal;
margin-top: 0;
}
好吧,问题是没有任何 CSS 属性似乎仅在较低版本的 IE 中应用于header
标记。不过,标签的 CSS会被应用。在所有其他浏览器中,它工作正常。我需要使用更具体的选择器还是有其他问题?p