Note that there are some explanatory texts on larger screens.

plurals
  1. POwhen active will change background
    primarykey
    data
    text
    <p>I'm playing with 3 images. and it's making me dizzy. What I want is when a tab is active it will change the background-image.</p> <p>I have this code right now in my html:</p> <pre><code>div id="promo-nav-wrapper"&gt; &lt;ul&gt; &lt;li id="active"&gt; &lt;a href="#" class="promo-call"&gt;&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#" class="promo-text"&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>My CSS</p> <pre><code>#promo-nav-wrapper { background: url("http://imageshack.us/photo/my-images/580/menubackground.png/"); background-repeat: repeat-x; width: 100%; height: 82px; } #promo-nav-wrapper ul { text-align: center; } #promo-nav-wrapper ul li { display: inline-block; margin-top: 20px; } #promo-nav-wrapper ul li a { height:53px; width:41px; display:block; text-decoration: none; background-repeat: no-repeat; text-shadow: none; } a.promo-call{ background-image:url("http://imageshack.us/photo/my-images/861/callicon2.png/"); z-index: 3; margin-right: 10px; } a.promo-text { background-image:url("http://imageshack.us/photo/my-images/807/texticon2.png/"); margin-left: 10px; margin-right: 10px; } /*this don't work*/ #promo-nav-wrapper li#active a { background-image: url('http://imageshack.us/photo/my-images/694/selectediconbackground.png/') no-repeat!important; height: 76px; width: 64px; /*background: blue;*/ }​ </code></pre> <p>My problem is I can't snip the image when an li is active, it doesn't show the background. T_T. Say like this</p> <pre><code>#active a{ background-image: url('selected_icon_background.png'); .... } </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.
    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