Css Test 3 - Webmasters - Nairaland
Nairaland Forum › Science/Technology › Webmasters › Css Test 3 (831 Views)
1 Reply
| Css Test 3 by yawatide(op): 10:05am On Jul 12, 2009 |
These are getting quite interesting ![]() Another (some code purposely stripped off in the interest of brevity as it has nothing to do with the actual quiz itself ):Building on quizzes 1 and 2 (https://www.nairaland.com/nigeria/topic-293811.0.html and https://www.nairaland.com/nigeria/topic-294974.0.html), let's say you have a site with 10 pages and all, thanks to the power of includes, have this code snippet in them: <style>Now, let's say that 1 or 2 of those pages needs to have a unique top margin. I could do it in one of 2 ways: <div class="blah nairaland">blah blah</div> OR <div id="nairaland" class="blah">blah blah</div>I personally would go for #2 as I don't like "classitis" but for the sake of argument, let's just say I wasn't aware of this "disease" and decided to go for #2 anyways, with the following rule: <style>Questions: 1) Given <div class="blah" id="nairaland">blah blah</div>, which rule (ID or CLASS) gets applied to the particular page 2) why? 3) Which of these is valid syntax? 3a) <div class="blah" class="nairaland">blah blah</div> 3b) <div class="blah nairaland">blah blah</div> OR 3c) <div id="blah nairaland">blah blah</div> 4) Explain your answer to #3 above As always, I await your answers. |
| Re: Css Test 3 by Nmeri17: 5:47pm On Nov 25, 2014 |
hmmm ques 1 ---> ID QUES 2. I think it's because there's only one value someone should comman answer 3 abeg ![]() |
| Re: Css Test 3 by Nobody: 9:39pm On Nov 25, 2014 |
So whats the need of adding class in your DIV? |
Write HTML And CSS Codes On Android Devices • How To: Create A Simple Hover Button With Html And Css • How Is My **Free** Css Ebook? • 2 • 3 • 4
Domain Regis & Web Hostin • I Need Help Uploading My Site To My Hosts Server • N a i r a host Suitable For Hosting Or Not

):