css备用列表背景问题 [英] css alternate list background problem

查看:60
本文介绍了css备用列表背景问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不确定我在圣诞节上正在做什么......但我猜我们都有自己的恶魔! -lol-


我正在使用以下css来设置我的水平菜单...


/ * STYLE HORIZONTAL MENU * /


#hmenu ul

{

list-style:none;

padding:0;

保证金:0;

}


#hmenu li

{

float:left;

margin:0 0.15em;

padding:0;

text-align:center

}


#hmenu li a

{

background:url(../ images / hmenu.gif )#fff bottom left repeat-x;

身高:1.3em;

行高:1.3em;

float:left;

宽度:7.5em;

显示:块;

border:0.1em solid#dcdce9;

颜色: #0d2474;

text-decoration:none;

text-align:center;

}


/ *评论反斜杠黑客隐藏了来自IE5-Mac的规则\\ * * /

#hmenu li a

{

float:none

}

/ *结束IE5-Mac黑客攻击* /


/ *保持HMENU来自包装* /


#hmenu

{

宽度:50em;

}


在php端,我有一个< ul>在一个< div =" hmenu">。


除了我希望这个列表的末尾有一个

不同的背景b之外,一切都很好用/ c他们不是链接 - 他们描绘了其他

信息(即联系电话和当前页面名称)。


我试过在我的css文档中设置.blueback并将

class =" blueback"在< a>中并且在< li>中没有运气。


i尝试了a.blueback和li.blueback。


没有运气。


有没有人有任何想法? css将显示我使用的图像为

我的主要背景,无论我尝试什么,它都会继续显示。

tia ...


....圣诞快乐! :-)

解决方案

2004年12月25日19:42:11 -0800,skeeterbug< js ****** @ san.rr.com>写道:

不确定我在圣诞节上正在做什么...但我猜我们都有自己的恶魔! -lol-

我正在使用下面的CSS来设置我的横向菜单...



祝你好运。我想要的Xmas是你的

问题的例子的URL。这真的会加快这个过程。


Jingle jingle。


neal,代码不是b / c它已经下降,不能起床! ;-)


新年快乐!!!


这里是我的HTML:


< div id =" hmenu">

< ul>

< li>< a class =" white">< span> <?php print


currentpage?>< / span>< / a>< / li>

< li>< a href =" elistings.php">电子邮件列表< / a>< / li>

< li>< a href =" listings.php">在线商家信息< / a>< / li>

< li>< a href =" mortgage.php">按揭区< / a>< / li>

< li>< a href =" drawing.php" class =" red">< span>输入到
Win!< / span>< / a>< / li>

< li class =" blueback">< a

class =" white">< span> 858-733-2886< / span>< / a>< / li>

< / ul>

< / div>


这是我的css:

li.blueback {background-color:#0d2474;


}


a.red span {color:#f00 ;

text-decoration:none;

}


a.white span {color:white;

text-decoration:none;


/ * STYLE HORIZONTAL MENU * /


#hmenu ul

{

list-style:none;

padding:0;

margin:0;

}


#hmenu li

{

浮动:左;

保证金:0 0.15em;

填充:0;

text-align:center

}


#hmenu li a

{

background:url(../ images / hmenu.gi f)#fff左下方重复-x;

身高:1.3em;

行高:1.3em;

float:left;

宽度:7.5em;

显示:块;

边框:0.1em solid#dcdce9;

颜色:#0d2474;

text-decoration:none;

text-align:center;

}


not sure what i''m doing developing on xmas... but i guess we all have
our own demons! -lol-

i''m using the following css to style my horizontal menu...

/* STYLE HORIZONTAL MENU */

#hmenu ul
{
list-style: none;
padding: 0;
margin: 0;
}

#hmenu li
{
float: left;
margin: 0 0.15em;
padding: 0;
text-align: center
}

#hmenu li a
{
background: url(../images/hmenu.gif) #fff bottom left repeat-x;
height: 1.3em;
line-height: 1.3em;
float: left;
width: 7.5em;
display: block;
border: 0.1em solid #dcdce9;
color: #0d2474;
text-decoration: none;
text-align: center;
}

/* Commented backslash hack hides rule from IE5-Mac \*/
#hmenu li a
{
float: none
}
/* End IE5-Mac hack */

/* KEEP HMENU FROM WRAPPING */

#hmenu
{
width: 50em;
}

on the php side, i have a <ul> in a <div="hmenu">.

everything works great except i want the ends of this list to have a
different background b/c they aren''t links - they portray other
information (ie, contact phone number and current page name).

i''ve tried setting .blueback in my css document and putting
class="blueback" in the <a> and in the <li> with no luck.

i tried a.blueback and li.blueback.

no luck.

does anyone have any ideas? the css will reveal i''m using an image as
my main background and it continues to display no matter what i try.
tia...

....and merry christmas! :-)

解决方案

On 25 Dec 2004 19:42:11 -0800, skeeterbug <js******@san.rr.com> wrote:

not sure what i''m doing developing on xmas... but i guess we all have
our own demons! -lol-

i''m using the following css to style my horizontal menu...


Happy ho-ho to you. What I want for Xmas is a URL to an examplr of your
problem. That will really speed up the process.

Jingle jingle.


neal, the code isn''t up b/c it has fallen and can''t get up! ;-)

happy new year!!!

here is my html:

<div id="hmenu">
<ul>
<li><a class="white"><span><?php print


currentpage ?></span></a></li>
<li><a href="elistings.php">Email Listings</a></li>
<li><a href="listings.php">Online Listings</a></li>
<li><a href="mortgage.php">Mortgage Area</a></li>
<li><a href="drawing.php" class="red"><span>Enter To
Win!</span></a></li>
<li class="blueback"><a
class="white"><span>858-733-2886</span></a></li>
</ul>
</div>

here is my css:

li.blueback {background-color: #0d2474;

}

a.red span { color: #f00;
text-decoration: none;
}

a.white span { color: white;
text-decoration: none;

/* STYLE HORIZONTAL MENU */

#hmenu ul
{
list-style: none;
padding: 0;
margin: 0;
}

#hmenu li
{
float: left;
margin: 0 0.15em;
padding: 0;
text-align: center
}

#hmenu li a
{
background: url(../images/hmenu.gif) #fff bottom left repeat-x;
height: 1.3em;
line-height: 1.3em;
float: left;
width: 7.5em;
display: block;
border: 0.1em solid #dcdce9;
color: #0d2474;
text-decoration: none;
text-align: center;
}


这篇关于css备用列表背景问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆