toolman Posted November 15, 2013 Share Posted November 15, 2013 Hi there, I have the following HTML: <body> <div class="all">text</div> </body> Is it possible to give the body tag a style based on the <div> with a class of .all? I want to do this only with CSS. Thanks Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted November 15, 2013 Share Posted November 15, 2013 Maybe body, .all { /* styles applies to both <body> and class="all" */ } Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted November 15, 2013 Share Posted November 15, 2013 Maybe body, .all { /* styles applies to both <body> and class="all" */ } Or you could just apply the styles to body. The <div> will inherit the styles automatically. @toolman - If you still need assistance, could you provide a little more information on what you're trying to accomplish? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.