Is it possible to change the css property of anchor tag
I have been using asp:Menu control and in 2.0 it renders as table and collection of anchor tag. I can't use display block property display is inline fo开发者_开发知识库r anchor tag. Has anyone been able to change it?
in css you can write code like this:
table a {
display: block; or inline;
\\ you can add any attribute that you want.
}
It applies the style on all <a>
tags inside a table.
An anchor tag, if i'm understanding your question correctly, is simply an a tag.
You can style it several ways: - with a class/id, which makes use of css's speed:
a.anchorClass {
display: block;
color: red;
... ... ...
}
- or with javascript after page load, you can get the element and apply css styles to it.
With jquery this is very easy:
$('a.anchorClass').css('color', 'red');
a { display: block !important;}
That should override any other declaration.
精彩评论