Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Odd CSS-related question

Posted on 2012-03-29
7
Medium Priority
?
382 Views
Last Modified: 2012-03-29
Greetings,

I recently needed to take a quiz for front-end development skills and this one of the questions under CSS2:

Write the code used to set the foreground and background colors of a paragraph to the same foreground and background colors of the user's window.

Assuming I understand the question correctly, I was stumped by this.  One thing that confused me was, when it refers to "user's window", I assumed it meant browser window.  If that is the case, I'm not familiar with any CSS2 that would grab background and foreground colors of browser windows.

I then thought this was related to using JavaScript but it was under the CSS2>colors category.  

Anybody know if this is possible to do this using CSS2 standards?
0
Comment
Question by:max7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 4

Accepted Solution

by:
elliottbenzle earned 800 total points
ID: 37782963
I would agree with you. Using only CSS there is no way to pull the current users background color. I also have a problem with the phrase "user's window", is that an element name on the page? Is it referring to the <body> tag or <html> tag. Even if CSS could pull styles from other elements, what element is he referring to?

I think it's a bad question with no correct answer.
0
 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 800 total points
ID: 37783240
auming that by the window they mean the page then the correct answer is probably just to code the paragragh with no color rule and let it natural inherit.  The question is obtuse IMO.

Cd&
0
 
LVL 17

Assisted Solution

by:OmniUnlimited
OmniUnlimited earned 400 total points
ID: 37783393
The only way I could interpret the question so that it makes any sense at all, would be to interpret "user's window" as the foreground and background of the current theme.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Closing Comment

by:max7
ID: 37783462
Thanks a lot for confirming what I thought was precisely the case!
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 37783485
The question is wrong since there is no HTML element called "user's window".  If the question had been about the parent element, then the answer could be 'inherit'.
0
 
LVL 1

Author Comment

by:max7
ID: 37783514
Thanks DaveBaldwin ... so even if "user's window" was interpreted as "browser window" even using inherit still would not work for this using only CSS2 standards, right?
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 37783571
"browser window" is not an HTML element either.  As far as I know, 'inherit' only works with the immediate parent element.  Since there is no usable definition of the immediate parent element in the question, there can't be a defined answer, just a bunch of guesses like we've done on this page.  'color' and 'background' were defined in CSS1 if that means anything to you.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question