positioning

1 view
Skip to first unread message

Jaehi

unread,
Jan 24, 2010, 11:27:32 PM1/24/10
to EDUC 176 Programming Lab
I was wondering where to place css absolute positioning.

{
position: absolute;
}


for example, if I have two divs. Do I need to place absolute
positioning in front of the divs or after?
Also, is it necessary to insert "*" in front of css positioning?

Troy

unread,
Jan 24, 2010, 11:43:15 PM1/24/10
to EDUC 176 Programming Lab
I'm not quite sure what you mean by placing the absolute positioning
"in front of the divs or after". If you have two divs with the same
class, then you can style the class in CSS:

HTML:

<div class="superbowl">...</div>
<div class="superbowl">...</div>

CSS:

.superbowl
{
position: absolute;
}

If they use id's instead, you can still style both of them using the
same rule in CSS:

HTML:

<div id="colts">...</div>
<div id="saints">...</div>

CSS:

#colts, #saints
{
position: absolute
}

Does that help? Also, be sure to check out the complete sample code
from lab: http://groups.google.com/group/educ-176-programming-lab/web/lab2-complete.zip

As for your second question, no, you do not need a "*" rule at the top
of your CSS document. In lab, we encouraged that you used one to reset
the margin and padding properties of all HTML elements, but it is not
a requirement.

Troy

Jaehi Jung

unread,
Jan 25, 2010, 1:39:24 AM1/25/10
to educ-176-pro...@googlegroups.com
Yes, this helps. Thanks a lot!! :)


Jaehi
--
Jaehi Jung
Master's Candidate
Stanford University School of Education
ja...@stanford.edu
cell: 650-703-6181
Reply all
Reply to author
Forward
0 new messages