Edited by syte, 16 June 2005 - 01:43 AM.
a few css questions that have been bugging me
Started by syte, Jun 16 2005 01:38 AM
2 replies to this topic
#1
Posted 16 June 2005 - 01:38 AM
I've been reading a book on css and xhtml. The book says that a block level element is usually the size of the parent (excluding margins, padding, borders). My question is, in a layout, shouldn't each of the <div> elements be the size of the <body> element, or is the body not considered block level or one that is an exception to the rule stated above? If all the divs should be the size of the body, how are two column layouts possible. My second question is, if a elements size is greater than that of the parent element (even without margins), what would happen to that element? Would the element automatically strink to fit the parent element? I'm sorry if these questions are kind of weirdly stated
. I can in more detail if needed. Thank you in advance for any help.
#2
Posted 16 June 2005 - 06:51 PM
For the body, it does stretch all the way across im pretty sure.
Two column layouts are possible by setting a width for each and floating them next to each other.
If a child div is bigger then the parent, im sure the parent expands, im sure it will not if there is no wrapper.
Two column layouts are possible by setting a width for each and floating them next to each other.
If a child div is bigger then the parent, im sure the parent expands, im sure it will not if there is no wrapper.
#3
Posted 17 June 2005 - 09:55 PM
thx a lot for the help
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
