Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
yeah, we have a css where the color for linkbuttons is set to navy, but I set the HTML tag attribute to white (which is the color we want a handful of our links to be) but it had no effect. By my understanding of style sheets (which is slim) I thought that attributes overrode anything from the css? I then tried defining new selector lower down in my css and associating that to my linkbuttons, but again it had no effect. I'm sure the problem is my understanding of style sheets...
  • Moderators
Posted

Yes, On most controls attributes override the css, but I beleive that the LinkButton gives css priority. Set the CssStyle of the LinkButton to "SomeClass" then in the css copy/paste the 4 A:Link,A:Visited etc.... to a new section of the css file and change each of the 4 to this.... A.SomeClass:link, A.SomeClass:Visited, etc...

 

Of course once you have copied all four you can then change their colors and so on.

Visit...Bassic Software
Posted

Excellent that worked, thanks very much

 

By the way I was wrong about the attribute not overriding the css so I could have done it that way but it is much better to use the css.

 

What we would like to do is have differnect css files for the different 'pages' of our website, but it is based on IBuySpy so it reality we only have one page and lots of user controls. So do you know away of having different stylesheets for different usercontrols?

  • Moderators
Posted

I don't think you can have an aspx and the added ascx use different css files because they both render to the single page.

 

They can however share the same css file. You may consiider having a css file per application or even section of an application.

Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...