Hi,
I created one website but in that website
in that site i make a link and applied style sheet but in browser style sheet not appered
please help me
Hi,
I created one website but in that website
in that site i make a link and applied style sheet but in browser style sheet not appered
please help me
Short answer: the stylesheet is probably loading (see 's span test), but link text must be styled on the anchor or via a selector that targets the anchor. A class on a surrounding element does not always override user-agent link rules or link pseudo-classes, so either put the class on the <a> itself or write a selector that targets anchors inside your element.
Example — give the anchor the class and style its states:
/* in your CSS */
a.mainsheetLink {
font-family: Tahoma, sans-serif;
font-size: 11px;
color: #6a5341;
font-weight: bold;
text-decoration: none;
}
a.mainsheetLink:hover {
color: #4a3723;
text-decoration: underline;
} <!-- in your HTML -->
<a href="page.html" class="mainsheetLink">Example link</a> If you prefer to keep the class on the parent (as you tested), target the anchor with a descendant selector:
/* keep the class on the container and style any link inside it */
.mainsheet2 a {
color: #6a5341;
text-decoration: none;
} Quick troubleshooting checklist (builds on and comments):
a can win; increase specificity rather than using !important.Jump to Post— ardeezstyle 0hi ! may be the style u embedded is not supported by the browsers.
Will u please let me know wat codes u used for the style
Jump to Post— lio04 17Me performs, i've inserted to HTML code this:
<span class="mainsheet2"> example </span>
It works.
hi ! may be the style u embedded is not supported by the browsers.
Will u please let me know wat codes u used for the style
.mainsheet2{
font-family:tahoma;
font-size:11px;
color:#6a5341;
font-weight:bold;
vertical-align:middle;
text-align:center;
} Please check this once...
Me performs, i've inserted to HTML code this:
<span class="mainsheet2"> example </span>
It works.
Me performs, i've inserted to HTML code this:
<span class="mainsheet2"> example </span>
It works.
but where i can give link
but if i use this code where can i give hyperlink
Hello guys! Thus anyone here knows best CSS tutorial sites... I really wanted to know CSS... and build my own site...
You have to put the link in <a> tags. A style can't have a link.
Or are you wanting the link to the style sheet. It goes in the style tag in the head section.
Note that browsers can switch off color changes for links with user settings.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.