Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to avoid inherit parent css
    primarykey
    data
    text
    <p>I have my Login Page which contains another div of Login information (username and password). My css setting for the div header color is WHITE. However, I would like the wording in the Login div to be GREEN. I have created a different css style for the Login div, however it still applies the css from parent div header. Below is my code:</p> <p><strong>login.jsp</strong></p> <pre><code>&lt;div id="header"&gt; &lt;div id="bannerLogin" &gt; &lt;table width="300px" border="0" cellpadding="0" cellspacing="0"&gt; &lt;tr&gt; &lt;td align="right"&gt; &lt;span class="writeupCopy"&gt; &lt;bean:message key="login.userId" bundle="label"/&gt; &lt;/span&gt; &lt;/td&gt; &lt;td align="left"&gt; &lt;html:text styleId="username" property="username" size="20" tabindex="0" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="right"&gt; &lt;span class="writeupCopy"&gt; &lt;bean:message key="login.password" bundle="label"/&gt; &lt;/span&gt; &lt;/td&gt; &lt;td align="left" valign="bottom"&gt; &lt;input name="password" size="20" tabindex="0" value="" id="password" type="password"&gt;&amp;nbsp; &lt;input name="btnSave" id="submit" type="image" src="${initParam.CONTEXT_PATH}/images/common/login.arrow.png" height="20px" width="20px" border="0"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p><strong>stylesheet.css</strong></p> <pre><code>#header, #footer { width: 100%; border-collapse: collapse; background-color: #4681C4; } #header td, #footer td { color: white; line-height: 1.2em; padding: 1px 5px; } #bannerLogin { color: green; float:right; height:104px; margin-left:0; margin-top:0; width:300px; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload