?
Solved

style - controls on page

Posted on 2014-02-02
5
Medium Priority
?
255 Views
Last Modified: 2014-02-04
Hello,
If I have 2 grids on a page and add this to the page header
div.RadGrid td.mergedCell
{
    border-bottom: 1px solid #333;
}

How do I only get this to affect the control RadGrid1 but not RadGrid2?
0
Comment
Question by:johnson1
[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
  • 2
  • 2
5 Comments
 
LVL 38

Assisted Solution

by:Tom Beck
Tom Beck earned 1000 total points
ID: 39828439
div.RadGrid:nth-of-type(1) td.mergedCell
{
    border-bottom: 1px solid #333;
}

...But it's not supported by IE8 or less.
0
 
LVL 43

Expert Comment

by:Chris Stanyon
ID: 39829125
if RadGrid1 and RadGrid2 are the IDs of the 2 grids, then use an ID selector, instead of a class selector:

div#RadGrid1 td.mergedCell { border-bottom: 1px solid #333; }

Open in new window

0
 

Author Comment

by:johnson1
ID: 39829821
Hello,
I tried both solutions. It still affects both RadGrid1 and RadGrid2.
0
 
LVL 43

Accepted Solution

by:
Chris Stanyon earned 1000 total points
ID: 39829857
Can we see a link to your page?

For my solution to work you must have a unique ID on each of the grids (they are case-sensitive):

id="RadGrid1"
id="RadGrid2"

Double check the source of your page to make sure you have these,
0
 

Author Closing Comment

by:johnson1
ID: 39831832
Thank you.
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
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 customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

770 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