From 588e25e5d0a30c25ca952ccaa1a2f1f1c92a03f6 Mon Sep 17 00:00:00 2001 From: Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: rescue --- rescue/05/question.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 rescue/05/question.txt (limited to 'rescue/05/question.txt') diff --git a/rescue/05/question.txt b/rescue/05/question.txt new file mode 100644 index 0000000..83ed51e --- /dev/null +++ b/rescue/05/question.txt @@ -0,0 +1,34 @@ +Question: +You have learned how to add id and class attributes to an HTML +element. Can an HTML element contain both an id and a class value? +If so, provide an example of a style rule for the id and the class. + +Answer: +Elements in HTML can use both a class and an id. In fact, I just +did this during my unit 1 project. Here is the CSS I used, as +well as an example of div elements using both a class and an id. + +CSS: +.col{ + position: fixed; + width: 30%; + height: 100%; + overflow-x: hidden; + z-index: 1; +} +#left{ + left: 0; + padding-left: 18%; +} +#right{ + right: 0; + padding-right: 18%; +} + +HTML: +
... +
... +