Solved

CSS troubleshooting

Posted on 2014-09-10
11
144 Views
Last Modified: 2014-09-11
YTD
Question: How can I change my CSS to show YTD in red?

Thank you

                  <asp:Panel ID="optRollup" Class="optRollup" runat="server">
                        <asp:RadioButton ID="rdMonthly" runat="server" Text="Monthly" TabIndex="1" GroupName="optRollup"
                              enabled="false" />
                        <asp:RadioButton ID="rdYTD" Text="YTD" Checked="true" runat="server" 
                            TabIndex="2" GroupName="optRollup" />&#160;&#160;
                    </asp:Panel>

#optRollup, #Panel3
{
    background-color:white;/*#cdc5bf;   ,*/
     border:solid 1px #808080;
    margin:2px 0px auto 2px;
    padding  : 0px auto 2px auto; 
    background:transparent;
    /*  #2f4f4f;#cdc9c9;*/
   display: inline;
   color: white; 
   font-family:Tahoma;
   font-size:10px;
}
 #rdYTD
{
    color:red;/*#cdc9c9;*/
}

Open in new window

0
Comment
Question by:Mike Eghtebas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40315584
Using runat="server" will change the ID in the browser
Add a class to the element and use that for the targetting in the CSS
0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40315590
Thank you.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40315602
You can also use this, but its a bit of a bad habit

[id$="rdYTD"] {}

Open in new window

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40315971
Is [id$="rdYTD"] {} for php? Or, or it would work for asp.net as well?
0
 
LVL 58

Expert Comment

by:Gary
ID: 40315973
No thats css
0
 
LVL 58

Expert Comment

by:Gary
ID: 40315974
[id$="rdYTD"] {
color:red
}

Open in new window

0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40316099
Hi Gary,

It is very nice alternate, but the following is not working for me for some reason.

 [id$="rdYTD"]
 {
    color:red;
}

How can I correct this? Do you post under a new question?

Thanks,

Mike
0
 
LVL 58

Expert Comment

by:Gary
ID: 40316105
Should be working
Try

 [id*="rdYTD"]
  {
     color:red;
 }

Open in new window

0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40316202
No luck yet. Not working.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40316220
[id$="rdYTD"] {
color:red !important
}

Open in new window

Or
 [id*="rdYTD"]
  {
     color:red !important;
 }

Open in new window

0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40317202
Maybe I am doing something wrong. It didn't work.

I may later add a new question later. I will send you a link.

Thanks,

Mike
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question