Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,194,061 members, 7,953,203 topics. Date: Thursday, 19 September 2024 at 12:25 PM

Tis Quiz Time! ;d - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Tis Quiz Time! ;d (1084 Views)

Hey People! I Want To See My Client's Wristwatch... Tis Awesome. / Most Confusing And Simple Maths Quiz / Very Easy Html/php Quiz :) (2) (3) (4)

(1) (Reply) (Go Down)

Tis Quiz Time! ;d by yawatide(f): 10:41am On Jul 08, 2009
This board is getting boring. How about a quiz to bring it back to life? wink

Suppose you have 3 files, all governed by the same CSS, say nl.css. Now, suppose you want each of the files to have a small variation, in our case, page A has a bgcolor of red, page B has a bgcolor of yellow and page C has a bgcolor of blue.

How do you give each page, via CSS, its individual bgcolor treatment, from within nl.css? In other words:

1) You can't use inline styles
2) You can't use a page-level stylesheet

If you need further clarification, do not hesitate to ask. I await your answers cool
Re: Tis Quiz Time! ;d by yawatide(f): 2:56pm On Jul 08, 2009
Of course, since this doesn't involve any site reviews and/or gun powder and actually involves learning, no one is willing to respond.  It's alright though.  I still await answers.

Come on everybody, letz all LEARN something!
Re: Tis Quiz Time! ;d by remoranger(m): 3:51pm On Jul 08, 2009
i agree. this board now bores me to tears.
But i doubt that a quiz will spice it up. what we need is a good old fashioned fight in the mud over a website review. there! that shud do the trick.

AS for the quiz,
I dont know y google refused to open, grin
Re: Tis Quiz Time! ;d by yawatide(f): 5:20pm On Jul 08, 2009
Time will tell, remoranger.

Una warri boys sef, una no dey ever lose. Highest na draw tongue
Re: Tis Quiz Time! ;d by Nobody: 6:32pm On Jul 08, 2009
. . .strolled by. . .
Re: Tis Quiz Time! ;d by lojik(m): 9:05am On Jul 09, 2009
Whats in it for me if i attempt d quiz?

Right or wrong, whats in it for me?**na 9ja we dey so**
Re: Tis Quiz Time! ;d by yawatide(f): 10:52am On Jul 09, 2009
dhtml:
Strolled by cos you don't know the answer or it is beneath you? tongue

lojik:
What is in it for you? A chance to LEARN something which, though not monetary, is bound to increase your knowledge base/skill set, 2 things that can help increase your worth in the long run wink

Now, let's try that again. Any takers? grin
Re: Tis Quiz Time! ;d by Nobody: 6:38pm On Jul 09, 2009
Maybe both, i am kinda rusty these dayz sef. Meanwhile let us give others a chance. . .
Re: Tis Quiz Time! ;d by bug24(m): 7:20pm On Jul 09, 2009
I wuld love to have an answer to this quiz @ yawa.

This issue has alwayz troubled ma mind, i alwayz end up seekin solace in renaming the css file, then call the new file into:
<link href="style.css" rel="stylesheet" type="text/css" />

i know its dumb but it solves the problem anyway, amendments to the page is also easy , tanks to the power of "include"

I await the answer to this quiz, i want to end this scourge.
Re: Tis Quiz Time! ;d by lojik(m): 8:47pm On Jul 09, 2009
body { background-color: #FF0000}
body.pageb { background-color: #FFFF00 }
body.pagec { background-color: #0000FF }


on page A, use <body >
on page B, use <body class="pageb">
on page C, use <body class="pagec">

I pray i'm right**shivering**
Re: Tis Quiz Time! ;d by yawatide(f): 9:35pm On Jul 09, 2009
bugs: scourge? lojik: shivering? ROFLMAO! Even if you were both wrong, what would be wrong with that? At least by me answering it correctly, you learn something which is the most important part. It's not like we are sitting face to face where people might turn and say, "I can't believe he didn't know that" LOL

The most efficient answer is lojik's. I would however make a few suggestions, albeit it's correct:

1) since your css rules, being applied just to the body, are unique, i would go with ID and not CLASS.
2) For your rules, when there are equal pairs of numbers or letters (like FF0000), you can make the code shorter like so: background-color: #ff0; Might not mean much for a small site but for a site that is hit by millions, a byte here and there adds up.

So there you have it - question answered. No one shivers. No scourges LOL. Now, if I were in a position to hire people over there, these are the type of questions I would ask (hint, hint tongue)

Let me think of another question. Expect it soon tongue
Re: Tis Quiz Time! ;d by bug24(m): 7:08am On Jul 10, 2009
hmmm, learnt something there.
well, i got this other scourge (lol).
when i put

<div id="content"> blah blah </div>

and

<div id="vertical-menu"> bloh bloh </div>

side by side, one pushes the other either up or down, they never align. i know i gotta use ma hands to close my eyes in shame while asking question but if u guyz are gonna kill me for this, no wahala, as long as i get my answer.

what do u do to keep em all aligned?

(breaks a chewing stick and puts in my mouth cos its early morning, tapping my fingers on the table, waiting for an answer)
Re: Tis Quiz Time! ;d by yawatide(f): 11:40am On Jul 10, 2009
bugs:

First it was "scourge". Now it is "cover face with hands in shame".  Hmm, I don't see things this way.  Even if you were to ask how to make text bold, it is no different, as far as I am concerned, from asking how to query a database.

Anyways, if I understand your question, you keep the 2 divs aligned by floating them left, then clearing the float immediately after.  If you are still having them not aligned after floating, check their widths and that of the container div.

For example (ignoring proper coding for illustrative purposes):
<div style="width: 100px;">
    <div style="float: left; width: 30px; margin-left: 10px;">blah</div>
    <div style="float: left;" width: 70px;">blah</div>
    <br clear="all" />
</div>

The above 2 inner divs won't align.  Why"? Because though their 2 widths = 100px, the margin-left has added an extra width of 10px thus making it 110px actually.  This is what the box-model theory is all about.  So your solution would be to either add 10px to the containing div, reduce the width of one of the inner divs or get rid of the margin.

Also, clearing "all" ensures that the elements revert back to being in the flow of the document. Otherwise, you have a situation where those floated div "bleed" through the container.

Does this answer your question? If not, let me know by being more specific.

Thanks,
Re: Tis Quiz Time! ;d by bug24(m): 5:36pm On Jul 10, 2009
@ Yawa, thanks for the answer/illustration, tried it, didnt all work like i intend, the two divs still shifts eachother. when one comes up, the other shifts down. so i wuld need to adjust their margins to suit, like

if DIV A is : margin-top: 120px
DIV B must also needs to be 120px but they shift eachother down despite the width accomodates the two.

most times i now have to go this way

DIV A margin-Top: 120px
DIV B margin-top: [b]-[/b]120px


something like that, so it can counter the shifts, i guess u dont know abt this, maybe am the one inventing this crazy css rule. grin

hmmm, maybe a clearly written css will help out, just put it up here.
Re: Tis Quiz Time! ;d by yawatide(f): 5:40pm On Jul 10, 2009
I am always afraid of -ve margins. Makes me shudder cos for one, ie browsers tend not to treat it well wink

Back to your issue:
Well, I was coding blind, I must confess. If you would, point us to a url and specify where the problem is, for better results.

It is doable. I just need to see it for myself.
Re: Tis Quiz Time! ;d by yawatide(f): 5:44pm On Jul 10, 2009

(1) (Reply)

Open Letter To The Smf Management From The Smf Developers / How To Program Mtn Sims To Make And Receive Free Mtn To Mtn Calls / Факты из жизни писателей

(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. 28
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.