Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,355 members, 7,957,952 topics. Date: Wednesday, 25 September 2024 at 05:29 AM |
Nairaland Forum / Science/Technology / Webmasters / Css Test 3 (788 Views)
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)
(1) (Reply)
Css Test 3 by yawatide(f): 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:
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:
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:
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? |
(1) (Reply)
I Need Help Uploading My Site To My Hosts Server / What Is In A Website Name Please Help With This! / Hey Tanks.
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10 |