CSS style - override another style?

Hi,

I have this link on a web page.  

<A class="LinkStyle" href="">Some Text</A>
The link was displayed correctly, like what I specified under 'LinkStyle'. I added a reference to an external CSS file, we have no control over this. This file has a generic style for links, like this 
a:link, a:visited, a:active, a:hover
{
  text-decoration: underline;
  color: #123456;
}
And this is screwing up the 'Some Text' link. If I save this external css file locally and comment out the generic anchor styles, that fixes my problem. (I don't have access to this external css file, and this generic styles may be in use someplace else) 
How can I make this work? I want my link to use 'LinkStyle' and override any other anchor styles?
Thanks.
 
 
0
new2aspdotnet
9/26/2007 7:51:07 PM
asp.net.client-side 24353 articles. 1 followers. Follow

3 Replies
901 Views

Similar Articles

[PageSpeed] 15

Hmmm... you should be able to override the inherited styles if you define your LinkStyle class. How do you define this?


If this post was useful to you, please mark it as answer. Thank you!
0
johram
9/26/2007 9:46:16 PM

How do I define LinkStyle, nothing special, just regular stuff.

FONT-WEIGHT: normal;
FONT-SIZE: 10pt;
COLOR: #483d8b;
FONT-FAMILY: arial
TEXT-DECORATION: none 

0
new2aspdotnet
9/27/2007 1:49:18 AM

It really depends on the order in which you import your stylesheets.  If you want your style to override the previous, then put your <link> tag after that one.  And always reset the styles used in the previous.  Alternatively, you can always use inline styles, which overrides everything, but is obviously more painful to maintain.

Hope this helps!  Please mark the helpful post(s) as Answer.


Josh Stodola ← Come check out my blog!
0
JoshStodola
9/27/2007 3:32:01 AM
Reply:

Similar Artilces:

Field css style / Label css style
What are the valid values to key in this fields through Novell Designer. Basically, I would like to change the border-color/background color of a SelectBox. I can't seem to find any documentation on this. Thanks in advance, Jason On 02/01/2009 08:35 AM, Jason Kee wrote: > What are the valid values to key in this fields through Novell Designer. > > Basically, I would like to change the border-color/background color of a > SelectBox. > > I can't seem to find any documentation on this. > > Thanks in advance, > Jason Basically you...

Styles or not to styles?
Scenario is as follows:I use align="center" in a DIV tag to, well, align content to the center.  But when running the page I get a warning saying that align is outdated.  So I'm thinking that styles is a better way to go.I remove align from the DIV tag and go for the equivalent style in styles - something like: styles="text-align: center;" - don't remember the exact format now but then I use Web Deveoper to set styles so it should be no syntax error.Anyway, running the page in Internet Explorer 8 and I get no center align what so ever.  It'...

Client Side Button Styles
I have a question concerning styling HTML buttons in asp.net 2.0.I've created a simple Stylesheet called StyleSheet.css like this:----------------------------------------buttons{font-size: x-small;color: #ffffff;font-family: Verdana, Arial;background-color: #666699;}----------------------------------------And I have a button in an aspx page that I need to apply the style to, so I tried this:---------------------------------------------------------------------------------------------<link rel="stylesheet" type="text/css" href="Styles/StyleSheet.css" /><input type=button id="btnUpdate...

superreview requested: [Bug 321708] Don't inline CSS styles in print dialogs : [Attachment 238884] Move inline styles to printing.css (revised again)
Ehsan Akhgari <ehsan.akhgari@gmail.com> has asked neil@parkwaycc.co.uk <neil@httl.net> for superreview: Bug 321708: Don't inline CSS styles in print dialogs https://bugzilla.mozilla.org/show_bug.cgi?id=321708 Attachment 238884: Move inline styles to printing.css (revised again) https://bugzilla.mozilla.org/attachment.cgi?id=238884&action=edit ------- Additional Comments from Ehsan Akhgari <ehsan.akhgari@gmail.com> (In reply to comment #6) > (From update of attachment 236611 [edit]) > >Index: themes/classic/global/printing.css > i was hoping t...

superreview cancelled: [Bug 321708] Don't inline CSS styles in print dialogs : [Attachment 236611] Move inline styles to printing.css (revised)
Ehsan Akhgari <ehsan.akhgari@gmail.com> has cancelled superreview: Bug 321708: Don't inline CSS styles in print dialogs https://bugzilla.mozilla.org/show_bug.cgi?id=321708 Attachment 236611: Move inline styles to printing.css (revised) https://bugzilla.mozilla.org/attachment.cgi?id=236611&action=edit ------- Additional Comments from Ehsan Akhgari <ehsan.akhgari@gmail.com> (In reply to comment #6) > (From update of attachment 236611 [edit]) > >Index: themes/classic/global/printing.css > i was hoping that this: > >+#fromPageInput, #toPageInput...

superreview denied: [Bug 321708] Don't inline CSS styles in print dialogs : [Attachment 238884] Move inline styles to printing.css (revised again)
neil@parkwaycc.co.uk <neil@httl.net> has denied Ehsan Akhgari <ehsan.akhgari@gmail.com>'s request for superreview: Bug 321708: Don't inline CSS styles in print dialogs https://bugzilla.mozilla.org/show_bug.cgi?id=321708 Attachment 238884: Move inline styles to printing.css (revised again) https://bugzilla.mozilla.org/attachment.cgi?id=238884&action=edit ------- Additional Comments from neil@parkwaycc.co.uk <neil@httl.net> >+#marginPage { >+ height: 29.7mm; >+} >+ >+#marginTop { >+ height: 0.05in; >+} >+ >+#marginLeft...

superreview requested: [Bug 321708] Don't inline CSS styles in print dialogs : [Attachment 236611] Move inline styles to printing.css (revised)
timeless <timeless@bemail.org> has asked neil@parkwaycc.co.uk <neil@httl.net> for superreview: Bug 321708: Don't inline CSS styles in print dialogs https://bugzilla.mozilla.org/show_bug.cgi?id=321708 Attachment 236611: Move inline styles to printing.css (revised) https://bugzilla.mozilla.org/attachment.cgi?id=236611&action=edit ------- Additional Comments from timeless <timeless@bemail.org> >Index: themes/classic/global/printing.css i was hoping that this: >+#fromPageInput, #toPageInput, #numCopiesInput, #topInput, #bottomInput, #leftInput, #rightI...

CSS Style in User Control Conflicts with style in BODY tag
I have a .CSS used by all pages. The .CSS defines style of BODY tag and styles used by a User Control. But when I place the user control on a page, some styles of BODY tag overwrite styles defined for User control. For example, User Control uses one set of colors and background-colors but at run time, the color and background-color set for BODY tag takes over. What am I missing? TIA. > styles used by a User Control How are you specifying the styles to be used within the User Control?Alister In my MyStyles.css I have ..TopMenu { font-weight: bold; font...

Style attributes updates on client side
Hello,I have some controls in an update panel. When I set style (display, fontWeight, etc) of these controls through client-side it does reflect in the browser. But when server-side control fires an event it still sees the old style attribute value.How do I communicate this?Example:Update panel U1 has DIV1 and LINK1 both with runat="server" attribute. DIV1 is display:none when page loads. LINK1 basically toggles DIV1 by setting display attribute (none/block) on server-side.But when I set DIV1 display property from client-side (say any other element) and after that I click LINK1, th...

Change page style client side
Like on http://www.yahoo.com/ I want to have different themes on my site. With a single mouseclick a user should be able to alter the page layout (without posting back).Therefore I want to change the class of certain divs on my page. But the id's of these divs are different on all pages.e.g. on the friends  page they are:<div id="friends" class="layout_red"></div><div id="overview" class="layout_red"></div>etc. I dont want to have javascript that differs on each page.What I want is: a cookie that determines which color ...

How can you find out the default styles if a css style sheet or theme is not selected
I have a web app running, and I like the way it is looking, but it uses the defaults for label fonts, forecolor, etc.  How can I find out what the defaults style information is for my web app   try using a debugger like firebug (in firefox). It might tell you what styles are being applied for each of the different elements. Hope this helps i assume by defaults you mean the styles that are applied to elements when you dont specify a class for them.  They must be defined in your .css file that is being applied. It might be included in your page using the following <l...

How can I reset the style of GridView from client-side....????
Hello: I've already changed the style this way:1 protected void dgViewSelectedItems_RowDataBound(object sender, GridViewRowEventArgs e) 2 { 3 if (e.Row.RowIndex > -1) 4 { 5 e.Row.Attributes.Add("onclick", "return rowClick(this," + e.Row.RowIndex + ")"); 6 } 7 } 8 9 protected override void Render(HtmlTextWriter writer) 10 { 11 string script = @"function rowClick(row, rowIndx) 12 { 13 ...

how to add css style in the vs.net for an aspx page?
it is always warning me of : <style>some defs</style> also, there is no class attribute in body taghttp://blogs.impx.net/dragonimp...

About CSS style
Name: John Robert V. Roberto Email: xp3rikimaruathotmaildotcom Product: Gran Paradiso Alpha 1 Summary: About CSS style Comments: Hi, I'm Robert from Philippines... Intro: www.friendster.com is very popular website here in Philippines I want you to know that Firefox browser is one only destroys my layout when I view my profile. If you're interested in what I'm saying. here's the link www.friendster.com/lv100 I check IE, Opera and Netscape it's all look the same but when I look my profile in Firefox my page looks RIDICULOUS. About Firefox when it co...

Style.Css
I want default backgroud picture on all my pages. I tried to use this code in style.css but, it's not working. Trying to do samething with TR. BODY { background :"Images/bkground.gif"; WHATS WRONG HERE FONT-FAMILY: Arial; FONT-SIZE:.9em; FONT-WEIGHT: normal; LETTER-SPACING: normal; TEXT-TRANSFORM: none; WORD-SPACING: normal; line-height: normal; } ..td { background-color:#99ccff; background-image:"/images/td.gif"; WHAT'S WRONG HERE? border-color:#000088; font-family:Arial;...

Web resources about - CSS style - override another style? - asp.net.client-side

Crash Override (@CrashOverrideNW) on Twitter
Log in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Crash Override @ CrashOverrideNW ...

Spyro: Enter the Dragonfly running 60 FPS with Emulated CPU Clock Override - YouTube
Spyro: Enter the Dragonfly is a variable framerate game. With a new feature added to Dolphin, Emulated CPU Clock Override, we can tell the game ...

NSW government will override Court of Appeal to give injured workers more certainty
Patrick Scala is one of 6000 injured workers left in&nbsp;limbo after a NSW&nbsp;court&nbsp;decided they could not top up their lump-sum compensation ...

Female 'viagra' drug: Did cynical marketing override medical science?
The merging of marketing and medical science is making it harder to distinguish the facts from the pharmaceutical fictions.

Rooster James Maloney defends decision to override coach's order
Sydney Roosters five-eighth James Maloney defended the decision to ignore coach Trent Robinson's instruction to take a shot at goal which, had ...

G20 summit: U.S., EU override Australia to put climate change on agenda
... will include a significant passage on climate change, EU officials said on Sunday, as the United States and other heavyweight nations override ...

Georgian legislature overrides presidential vetoes again
Georgian legislature overrides presidential vetoes again People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, Apr, May, Jun, Jul, ...

Obama could override ITC in any device import blocks by Apple or Google
Didn't know this: But another peculiarity of the ITC is that its rulings can be waived by the president. Verizon thinks it would be great if ...

Senate votes to override McCrory marriage veto; House next
Gov. Pat McCrory&#39;s veto of a bill that would allow some North Carolina court officials to refuse to perform gay marriage activities because ...

International CES Overrides CNET, Awards Hopper "Best of" - Adweek
International CES dumps CNET as awards partner

Resources last updated: 1/22/2016 2:52:07 AM