初学者寻求css问题的帮助 [英] Beginner seeks help with css problem

查看:59
本文介绍了初学者寻求css问题的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望有人可以帮我解决我遇到的问题

样式表。我刚刚开始使用它们,所以它的价值可能超过

。麻烦的是我似乎无法修复它

所以非常感谢任何帮助。


基本上我正在使用一个我继承的网页有一个菜单在

,布局/颜色是这样的:


标题(总是黄色)

- 链接(总是白色而不管访问与否等等,但悬停添加

下划线

- 链接(无论访问与否,总是白色等)但是悬停添加

下划线

- 链接(无论是否访问都是白色的,但是悬停添加

下划线


ete etc

我继承的css代码如下:

..leftNav {

font:bold 14px Helvetica,arial;

颜色:#FFFFFF;

背景:#663333中心;

字母间距:.01em;

}

td.leftNav {

字体:粗体14px Helvetica,arial;

颜色:#FFFFFF;

text - 装饰:无;

背景:#663333中心;

字母间距:.01em;

border-top:1px solid#000033;

border-left:1px solid#000033;

}


td.leftNav ul {

display:block ;

list-style:none;

margin:0;

padding:0;

}


td.leftNav li {

display:block;

padding:5px 0px;

border- bottom:2px solid #FFFFFF;

}


td.leftNav li a:link,a:visited,{

font -weight:粗体;

颜色:#ffffff;

text-decoration:none;

border:none;

背景:透明;

}


td.leftNav li a:hover {font-weight:bold;

字体-weight:粗体;

颜色:#ffffff;

text-decoration:下划线;

border:none;

背景:透明;

}


..menuitem {颜色:#FFFF00!important; }

我现在想要添加的是

中一个全新的单独表格,其中有链接总是黄色而不管访问,

是否有效,没有下划线。也许他们可以在

悬停时改变颜色,但这没关系。我已经尝试了各种尝试,但是我总是好像在主菜单中改变

页面上其他链接的颜色而且我可以''明白为什么。所以,任何帮助都会很好。
$ div class =h2_lin>解决方案

就我个人而言,我觉得查看直播更容易;已发布的示例

而不是尝试可视化CSS代码的样子,特别是如果

试图发现问题。你可能想发布你的尝试到目前为止?


如果你想要一个特定的表(或一组表)有不同的链接

样式,你应该给新表一个类,然后按上下文选择

链接属性。


所以如果你有一个class =" myNewTable"你可以选择里面的链接

就像这样:

table.myNewTable a:link,

table.myNewTable a:访问过,

table.myNewTable a:悬停,

table.myNewTable a:活跃{

颜色:黄色;

}


请注意,浏览器有自己的默认样式表(您必须先猜测然后重写),这很重要(例如)指定链接的所有变体

或者你可能会看到这个默认样式。


我同意显示悬停和访问它是有用的状态,如果一个链接很慢,那么向用户显示链接是否有效也是有用的(所以他/她可以

看到它 ;注意到点击!。


-

####################

## PH,伦敦

####################

" ;伊恩" < ia*@home.com>在留言中写道

news:v4 ******************************** @ 4ax.com ...


我现在想要添加的是
中一个全新的单独表格,其中有链接总是黄色而不管访问,
有效与否,没有下划线。也许他们可以在悬停时改变颜色,但这没关系。我已尝试过各种尝试,但我似乎总是在主菜单的
页面上更改其他链接的颜色,并且无法理解原因。所以,任何帮助都会很棒。



2005年5月29日19:00:33 GMT,Blinky the Shark< ;没有***** @ box.invalid>

写道:

Ian写道:

什么我现在希望能够在
中添加一个全新的单独表格,其中有链接总是黄色而不管访问,
是否有效,没有下划线。也许他们可以改变颜色



为什么你不想让我看到我已经使用过哪些链接来迷惑我?



因为它们不是指向其他网站的链接,而是代表登录到与该网站相关的消息论坛的

人的名字。

点击姓名会显示该人的个人资料,但当名称为混合颜色时,

显示会显示为naff。


Ian写道:

2005年5月29日19:00:33 GMT,Blinky the Shark< no ***** @ box.invalid>
写道:

Ian写道:

我现在想要添加的是一个全新的
中的单独表格,无论是否访问,都有始终为黄色的链接,
是否有效,没有下划线。也许他们可以改变颜色


为什么你不想让我看到我已经使用过哪些链接而迷惑我?


因为它们不是指向其他网站的链接,而是代表登录到与该网站相关联的消息论坛的人员的名称。
点击这些名称会显示当名字是混合颜色时,那个人,但是
显示器看起来很简单。




我还想知道我去过哪里。


-

Blinky Linux注册用户297263

杀死Google网上论坛发布的所有Usenet帖子

信息:< a rel =nofollowhref =http://blinkynet.net/comp/uip5.htmltarget =_ blank> http://blinkynet.net/comp/uip5.html

*还包含用于访问NON-BETA GG存档界面的链接*


''m hoping someone can help me resolve a problem I am having with
stylesheets. I''ve only just started usinbg them so it''s more than
likely something similar. Trouble is I don''t seem to be able to fix it
so would be grateful for any help.

Basically I''m working with a web page I inherited which has a menu in
which the layout/colours are something like this:

Heading (always yellow)
- Link (always white irrespective of visited or not etc but hover adds
an underline
- Link (always white irrespective of visited or not etc but hover adds
an underline
- Link (always white irrespective of visited or not etc but hover adds
an underline

ete etc
The css code I inherited is as follows:
..leftNav {
font: bold 14px Helvetica, arial;
color: #FFFFFF;
background: #663333 center;
letter-spacing: .01em;
}
td.leftNav {
font: bold 14px Helvetica, arial;
color: #FFFFFF;
text-decoration: none;
background: #663333 center;
letter-spacing: .01em;
border-top: 1px solid #000033;
border-left: 1px solid #000033;
}

td.leftNav ul {
display: block;
list-style: none;
margin: 0;
padding: 0;
}

td.leftNav li {
display: block;
padding: 5px 0px;
border-bottom: 2px solid #FFFFFF;
}

td.leftNav li a:link, a:visited, {
font-weight: bold;
color:#ffffff;
text-decoration: none;
border: none;
background: transparent;
}

td.leftNav li a:hover {font-weight: bold;
font-weight: bold;
color:#ffffff;
text-decoration: underline;
border: none;
background: transparent;
}

..menuitem { color: #FFFF00 !important; }
What I now want to be able to add is a completely new separate table in
which there are links which are ALWAYS yellow irrespective of visited,
active or not, with no underline. Maybe they could change colour on
hover but it doesn''t matter. I''ve tried various attempts at this but I
always seem to end up changing the colours of the other links on the
page in the main menu and can''t understand why. So, any help would be
great.

解决方案

Personally I find it much easier to look at a "live" published example
rather than try to visualise what CSS code will look like, especially if
trying to spot a problem. You might like to publish your attempts so far?

If you want to have a specific table (or set of tables) have different link
styling, you should probably give the new table a class, and then pick out
the link properties by context.

So if you have a table of class="myNewTable" you could pick out links inside
it like this:

table.myNewTable a:link,
table.myNewTable a:visited,
table.myNewTable a:hover,
table.myNewTable a:active {
color: yellow;
}

Note that browser have their own default style sheets (which you have to
guess at and then override) so it''s important (eg) to specify all variants
of a link or you may see this default styling.

I agree that it''s useful to show hover and visited states, and if a link is
slow, it''s also useful to show the user that a link is active (so he/she can
see that it "noticed" the click!).

--
####################
## PH, London
####################
"Ian" <ia*@home.com> wrote in message
news:v4********************************@4ax.com...


What I now want to be able to add is a completely new separate table in
which there are links which are ALWAYS yellow irrespective of visited,
active or not, with no underline. Maybe they could change colour on
hover but it doesn''t matter. I''ve tried various attempts at this but I
always seem to end up changing the colours of the other links on the
page in the main menu and can''t understand why. So, any help would be
great.



On 29 May 2005 19:00:33 GMT, Blinky the Shark <no*****@box.invalid>
wrote:

Ian wrote:

What I now want to be able to add is a completely new separate table in
which there are links which are ALWAYS yellow irrespective of visited,
active or not, with no underline. Maybe they could change colour on



Why do you want to confuse me by not letting me see which links I''ve
already used?



Because they are not links to other web sites but represent the names of
people who are logged on to the message forum associated with the site.
Clicking on the names brings up the profile of the person but the
display looks naff when the names are in mixed colours.


Ian wrote:

On 29 May 2005 19:00:33 GMT, Blinky the Shark <no*****@box.invalid>
wrote:

Ian wrote:

What I now want to be able to add is a completely new separate table in
which there are links which are ALWAYS yellow irrespective of visited,
active or not, with no underline. Maybe they could change colour on

Why do you want to confuse me by not letting me see which links I''ve
already used?


Because they are not links to other web sites but represent the names of
people who are logged on to the message forum associated with the site.
Clicking on the names brings up the profile of the person but the
display looks naff when the names are in mixed colours.



I still want to know where I''ve been.

--
Blinky Linux Registered User 297263
Killing all Usenet posts from Google Groups
Info: http://blinkynet.net/comp/uip5.html
*ALSO contains links for access to the NON-BETA GG archive interface*


这篇关于初学者寻求css问题的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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