• +91 9723535972
  • info@interviewmaterial.com

CSS Interview Questions and Answers

Related Subjects

Question - CSS is clearly very useful for separating style from content. But apparently people tend to have problems when using it for layouts. Would you say this is because people have not yet understood how to properly do layout in CSS, or is it CSS that is lacking in this area? What can be done to improve the situation? --- Would the web benefit from HTML and CSS being complemented with some kind of "layout language"?

Answer - Layout and style should be tackled by the same language and the two are intertwined. Trying to split the two is like splitting the HTML specification in two, one specification describing inline elements and the other describing block elements. It's not worth the effort. CSS is capable of describing beautiful and scalable layouts. The CSS Zen Garden has been a eye-opening showcase of what is possible today. If MS IE had supported CSS tables, another set of layouts would have been possible. So, there is still lots of potential in the existing CSS specifications which should be the next milestone. I always wanted to have "included" substyles or "aliases" in my CSS definition, to save redundancy. (For includes) .class1 { color:#ff0000; } .class2 { background-color:#ffffff; } .class3 { include:class1,class2;font-weight:bold; } (For aliases) @alias color1 #ff0000; @alias color2 #ffffff; @alias default_image url('/img/image1.jpg'); .class1 { color:color1; } .class2 { background-image:default_image;background-color:co lor2; } This way we could change colors or images for a whole webpage by editing a reduced number of lines.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners