Mr.Sam
18-06-2007, 07:53 PM
Hey :)
I started learning html and css today and have a question.
Currently i have three div's each expands when more text is added - However if i was to have one box above the other (Height wise)
could i make it so that when the top expands the bottom one moves down so that they are always the same distance eg 50px from each other?
I have no idea if the coding is good - i started today and previewing it it seems to work lol..
It's linked into a html document and i can supply that code if needed..
body {background: #ABABAB;
font-family: "comic sans ms",ariel, sans-serif;
color: black;}
h1 {color: #7A7A7A;
text-align: center;}
h2 {color: #7A7A7A;
text-align: center;}
div.col1 {width: 400px;
background: white;
font-size: 10pt;
padding: 10px;
border-style: solid;
border-size: 1px;
border-color: black;
position:absolute;
top: 100px;
left: 150px;}
div.col2 {width: 150px;
background: white;
font-size: 10pt;
padding: 10px;
border-style: solid;
border-size: 1px;
border-color: black;
position:absolute;
top: 100px;
left: 600px;}
div.col3 {width: 600px;
background: white;
font-size: 10pt;
padding: 10px;
border-style: solid;
border-size: 1px;
border-color: black;
position:absolute;
top: 36px;
left: 150px;}
body {
margin-top: 50px;
margin-right: 50px;
margin-bottom: 50px;
margin-left: 50px;}
I started learning html and css today and have a question.
Currently i have three div's each expands when more text is added - However if i was to have one box above the other (Height wise)
could i make it so that when the top expands the bottom one moves down so that they are always the same distance eg 50px from each other?
I have no idea if the coding is good - i started today and previewing it it seems to work lol..
It's linked into a html document and i can supply that code if needed..
body {background: #ABABAB;
font-family: "comic sans ms",ariel, sans-serif;
color: black;}
h1 {color: #7A7A7A;
text-align: center;}
h2 {color: #7A7A7A;
text-align: center;}
div.col1 {width: 400px;
background: white;
font-size: 10pt;
padding: 10px;
border-style: solid;
border-size: 1px;
border-color: black;
position:absolute;
top: 100px;
left: 150px;}
div.col2 {width: 150px;
background: white;
font-size: 10pt;
padding: 10px;
border-style: solid;
border-size: 1px;
border-color: black;
position:absolute;
top: 100px;
left: 600px;}
div.col3 {width: 600px;
background: white;
font-size: 10pt;
padding: 10px;
border-style: solid;
border-size: 1px;
border-color: black;
position:absolute;
top: 36px;
left: 150px;}
body {
margin-top: 50px;
margin-right: 50px;
margin-bottom: 50px;
margin-left: 50px;}