Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 08, 2013 04:41 AM by raju dasa
Member
71 Points
115 Posts
Jan 08, 2013 03:09 AM|LINK
Can class definitions be nested. For example, if I have:
.center {text-align:center;}
.LabelSmall { font-family:Arial; font-size:10px; font-weight: normal; }
can I nest the definition center in the definition of LabelSmall in some way?
Figuratively:
.LabelSmallCentered {
LabelSmall
center
}
Contributor
3832 Points
651 Posts
Jan 08, 2013 03:14 AM|LINK
That is not possible, but you can group css classes as well as you can do nesting.
Please refer
http://www.w3schools.com/css/css_grouping_nesting.asp
Participant
1042 Points
190 Posts
Jan 08, 2013 03:15 AM|LINK
Refer the links for reference
http://stackoverflow.com/questions/3119411/nested-classes-selectors
It may help you.
Star
14730 Points
2496 Posts
Jan 08, 2013 04:41 AM|LINK
Hi,
For ur requirement u have to use either LESS or SASS
Check this site:
http://sass-lang.com/
achalk
Member
71 Points
115 Posts
Can CSS classes contain CSS classes?
Jan 08, 2013 03:09 AM|LINK
Can class definitions be nested. For example, if I have:
.center {text-align:center;}
.LabelSmall
{
font-family:Arial;
font-size:10px;
font-weight: normal;
}
can I nest the definition center in the definition of LabelSmall in some way?
Figuratively:
.LabelSmallCentered
{
LabelSmall
center
}
senthilwaits
Contributor
3832 Points
651 Posts
Re: Can CSS classes contain CSS classes?
Jan 08, 2013 03:14 AM|LINK
That is not possible, but you can group css classes as well as you can do nesting.
Please refer
http://www.w3schools.com/css/css_grouping_nesting.asp
Senthil Kumar Sundaram
pro.shailend...
Participant
1042 Points
190 Posts
Re: Can CSS classes contain CSS classes?
Jan 08, 2013 03:15 AM|LINK
Refer the links for reference
http://www.w3schools.com/css/css_grouping_nesting.asp
http://stackoverflow.com/questions/3119411/nested-classes-selectors
It may help you.
Blog: Dot Net Tricks Windows Apps
Please "Mark As Answer" if my suggestions helps you
raju dasa
Star
14730 Points
2496 Posts
Re: Can CSS classes contain CSS classes?
Jan 08, 2013 04:41 AM|LINK
Hi,
For ur requirement u have to use either LESS or SASS
Check this site:
http://sass-lang.com/
rajudasa.blogspot.com || blog@opera