ok i'm a CSS NEWB. i have a site already done, but it only uses CSS for some fonts. it uses tables for the layout and one table consists of 3 columns and is HUGE, so sometimes the page loads slow. i want to break up the big table and use CSS to make the 3 columns instead.
as it is now without CSS, i have one big table centered, so the 3 columns are all always centered side-by-side. i'm having trouble replicating this with CSS.
below is someone else's code that i'm tinkering with. column1 is on the left, column2 is in the middle, and column 3 is on the right. as of now, column2 is centered, but i can't get column1 and column3 to stick to the sides of column2. also, i would like all 3 aligned equally at the top.
could someone please modify this code to show me how this would be done?
thanks
<style type="text/css">
body {
text-align:center;
width: 728px;
margin: 0px;
padding: 0px;
/* Sets Width to Maximum allowed */
div#main {
width: 728px;
}
div#column3 {
position: absolute;
width: 120px;
right: 10px;
}
div#column1 {
position: absolute;
left: 0px;
top: 100px;
width: 120px;
}
div#column2 {
width: 468px;
mmargin-left: auto; margin-right: auto;
}
</style>actually, i just found this GREAT link. i probably won't need help now.
<!-- m --><a class="postlink" href="http://glish.com/css/3.asp">http://glish.com/css/3.asp</a><!-- m --><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>3-Column Layout - CSS Example</title>
<style type="text/css"><!--
body {
width: 780px;
margin: 20px auto;
}
div {
border: 1px solid #000;
}
div p {
padding: 10px;
}
#left {
width: 259px;
float: left;
}
#middle {
margin-left: -1px;
width: 258px;
float: left;
}
#right {
margin-left: -1px;
width: 259px;
float: left;
}
--></style>
</head>
<body>
<div id="left">
<p>Fuh. Cec die qam siq ded zau yeu reo ziw qopyiv nel nonlumheg lai
puplai qam dofjii dug. Pupsep yiv yiv pupvotgig jojhoilumnuohoilumziw
xas cab kullej gig tap cab tir cid yiv bic jojjeh bue. Wes fee xas
kokvotcab yat momjojlai qen cec tap kah yiv sorxuwded xiu gig yat
quqgef wes ziw pin ran siq jii sordofzev xas zau gig qopsep sep tosver
lej sao yowtap ziw bodhaf xas zoxpupnel kij tutqoplolgae teq ver kij
woukah kokyuxded yat nim xovsiq mek yuxjag kokhuj. Rip bodnuorip ziw
dofdofyat kei jeh yeu hih wuvwoumaj cid zoxyowhih vis poomaj gig cuf.
Kah lolkokdug. Fogjii jojsorroqlum.</p>
</div>
<div id="middle">
<p>Ver dac yuxvaq mil xuwjukfif pin cid ded die ziw cuf. Dofsao pem
dofxet pal votjeh siq votjag wes ded kah lumteq lej vis nim munhoixiu
nim lumjeh bodkei wuvtuttir lollik roqfif mil pupdofdie lej xuwkij jag
woujeh vuuvotyowzau kulfuh. Yowkei bue. Dug. Xuwxet pal rurzau fogteq
suscid poogef fad fee lumsorxuwfuh. Reo dac hih sao jag fad jag beb jii
hih ded nuololcab zev cid bic huj. Mil munxas bic lej coefif xovzuyqio
ran gui. Lai ran suscid rip jag tutpin zau gig bodwes jii jag fogvaq
siq dofgef sao zoxlej roqhih ded quqyeu nuoquqpal tap quqfad kei roqbaa
siq jukhoicec wourip dug. Nongef qam nim poopal hih cuf. Xuwhuj. Cuf.
Fogxiu kij beb heg roqfogqam kulvotxiu sorxet reo loljukhih kij lej
coebic roqtoscoecec ziw lik gef tir qoplej jukbic wuvfif poogig
susmomcoemunyeu cuf. Rurfoghih yat xet qam ran bodpin reo
coenonmuntosquqbeb quqjojfad tosfad rip pal teq maj mek sao bodboddac
cec lolzau xas tir yeu qam tospem dug. Pal zev.</p>
</div>
<div id="right">
<p>Nel dofhuj. Munziw nel nel nim wes jeh rurdug. Rip xovded nuocuf.
Yuxjii lai kah lumhih tir nak rip jii baa lumkulqio jeh jeh jii lai mil
sordac teq jag zoxpal roqjukran nuocuf. Xiu baa roqxovsusvaq vuucec siq
lolfoglumgohsoryeu fee reo haf gui. Huj. Rurrip fogpin lik hih
lollumkah pupxet poojii baa cid jojrip zuygae nonwit xas rip tap nim
fad munqam cab xet baa fee kij tir jojcab sorjojhoiqio pupheg dug. Qen
cid huj. Beb tap kei zoxziw reo lai poorurnuozau hih nel zau war gef
toshaf gui. Sep qam ziw gohwes maj huj. Quqlik huj. Dac qoppoolik mek
votnak xovlumwes hoizev xiu dac juktostosbic yowwes mil pem wou.</p>
</div>
</body>
</html>I have been searching this forum and reading alistapart and others, but I still cannot get my 3-column layout to display properly. The columns all appear, but the white background only gets displayed as long is there is content in the <div>, which means that the columns are not equal length. I am using a body background color (green) and the column backgrounds need to all be white, and stretch the full length of the page. IE is actually displaying it the way I like, but no one really uses that piece of crap browser, do they?!? (and I feel sorry for those that do. Just what I want, browser hijackers, malware and other "fun" stuff!)Originally posted by Larzman
I am using a body background color (green) and the column backgrounds need to all be white, and stretch the full length of the page.
You'll be interested in Faux Columns (<!-- m --><a class="postlink" href="http://www.alistapart.com/articles/fauxcolumns/">http://www.alistapart.com/articles/fauxcolumns/</a><!-- m -->) at A List Apart (<!-- m --><a class="postlink" href="http://www.alistapart.com/">http://www.alistapart.com/</a><!-- m -->). If you still want some assistance, post another topic in this forum.
Originally posted by Larzman
IE is actually displaying it the way I like, but no one really uses that piece of crap browser, do they?!?
*sigh* If only that were true... September 2004 browser usage stats (<!-- m --><a class="postlink" href="http://www.thecounter.com/stats/2004/September/browser.php">http://www.thecounter.com/stats/2004/Se ... rowser.php</a><!-- m -->)Originally posted by Larzman
IE is actually displaying it the way I like, It may be the way you like, but IE is displaying it incorrectly. Trust me on that one.I know IE sux, but I have to test for it also on my company website - unfortunately! I've heard that before, page displays only well in IE, that's because IE is broken.
Would you like me to post the page & CSS I'm using?
as it is now without CSS, i have one big table centered, so the 3 columns are all always centered side-by-side. i'm having trouble replicating this with CSS.
below is someone else's code that i'm tinkering with. column1 is on the left, column2 is in the middle, and column 3 is on the right. as of now, column2 is centered, but i can't get column1 and column3 to stick to the sides of column2. also, i would like all 3 aligned equally at the top.
could someone please modify this code to show me how this would be done?
thanks
<style type="text/css">
body {
text-align:center;
width: 728px;
margin: 0px;
padding: 0px;
/* Sets Width to Maximum allowed */
div#main {
width: 728px;
}
div#column3 {
position: absolute;
width: 120px;
right: 10px;
}
div#column1 {
position: absolute;
left: 0px;
top: 100px;
width: 120px;
}
div#column2 {
width: 468px;
mmargin-left: auto; margin-right: auto;
}
</style>actually, i just found this GREAT link. i probably won't need help now.
<!-- m --><a class="postlink" href="http://glish.com/css/3.asp">http://glish.com/css/3.asp</a><!-- m --><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>3-Column Layout - CSS Example</title>
<style type="text/css"><!--
body {
width: 780px;
margin: 20px auto;
}
div {
border: 1px solid #000;
}
div p {
padding: 10px;
}
#left {
width: 259px;
float: left;
}
#middle {
margin-left: -1px;
width: 258px;
float: left;
}
#right {
margin-left: -1px;
width: 259px;
float: left;
}
--></style>
</head>
<body>
<div id="left">
<p>Fuh. Cec die qam siq ded zau yeu reo ziw qopyiv nel nonlumheg lai
puplai qam dofjii dug. Pupsep yiv yiv pupvotgig jojhoilumnuohoilumziw
xas cab kullej gig tap cab tir cid yiv bic jojjeh bue. Wes fee xas
kokvotcab yat momjojlai qen cec tap kah yiv sorxuwded xiu gig yat
quqgef wes ziw pin ran siq jii sordofzev xas zau gig qopsep sep tosver
lej sao yowtap ziw bodhaf xas zoxpupnel kij tutqoplolgae teq ver kij
woukah kokyuxded yat nim xovsiq mek yuxjag kokhuj. Rip bodnuorip ziw
dofdofyat kei jeh yeu hih wuvwoumaj cid zoxyowhih vis poomaj gig cuf.
Kah lolkokdug. Fogjii jojsorroqlum.</p>
</div>
<div id="middle">
<p>Ver dac yuxvaq mil xuwjukfif pin cid ded die ziw cuf. Dofsao pem
dofxet pal votjeh siq votjag wes ded kah lumteq lej vis nim munhoixiu
nim lumjeh bodkei wuvtuttir lollik roqfif mil pupdofdie lej xuwkij jag
woujeh vuuvotyowzau kulfuh. Yowkei bue. Dug. Xuwxet pal rurzau fogteq
suscid poogef fad fee lumsorxuwfuh. Reo dac hih sao jag fad jag beb jii
hih ded nuololcab zev cid bic huj. Mil munxas bic lej coefif xovzuyqio
ran gui. Lai ran suscid rip jag tutpin zau gig bodwes jii jag fogvaq
siq dofgef sao zoxlej roqhih ded quqyeu nuoquqpal tap quqfad kei roqbaa
siq jukhoicec wourip dug. Nongef qam nim poopal hih cuf. Xuwhuj. Cuf.
Fogxiu kij beb heg roqfogqam kulvotxiu sorxet reo loljukhih kij lej
coebic roqtoscoecec ziw lik gef tir qoplej jukbic wuvfif poogig
susmomcoemunyeu cuf. Rurfoghih yat xet qam ran bodpin reo
coenonmuntosquqbeb quqjojfad tosfad rip pal teq maj mek sao bodboddac
cec lolzau xas tir yeu qam tospem dug. Pal zev.</p>
</div>
<div id="right">
<p>Nel dofhuj. Munziw nel nel nim wes jeh rurdug. Rip xovded nuocuf.
Yuxjii lai kah lumhih tir nak rip jii baa lumkulqio jeh jeh jii lai mil
sordac teq jag zoxpal roqjukran nuocuf. Xiu baa roqxovsusvaq vuucec siq
lolfoglumgohsoryeu fee reo haf gui. Huj. Rurrip fogpin lik hih
lollumkah pupxet poojii baa cid jojrip zuygae nonwit xas rip tap nim
fad munqam cab xet baa fee kij tir jojcab sorjojhoiqio pupheg dug. Qen
cid huj. Beb tap kei zoxziw reo lai poorurnuozau hih nel zau war gef
toshaf gui. Sep qam ziw gohwes maj huj. Quqlik huj. Dac qoppoolik mek
votnak xovlumwes hoizev xiu dac juktostosbic yowwes mil pem wou.</p>
</div>
</body>
</html>I have been searching this forum and reading alistapart and others, but I still cannot get my 3-column layout to display properly. The columns all appear, but the white background only gets displayed as long is there is content in the <div>, which means that the columns are not equal length. I am using a body background color (green) and the column backgrounds need to all be white, and stretch the full length of the page. IE is actually displaying it the way I like, but no one really uses that piece of crap browser, do they?!? (and I feel sorry for those that do. Just what I want, browser hijackers, malware and other "fun" stuff!)Originally posted by Larzman
I am using a body background color (green) and the column backgrounds need to all be white, and stretch the full length of the page.
You'll be interested in Faux Columns (<!-- m --><a class="postlink" href="http://www.alistapart.com/articles/fauxcolumns/">http://www.alistapart.com/articles/fauxcolumns/</a><!-- m -->) at A List Apart (<!-- m --><a class="postlink" href="http://www.alistapart.com/">http://www.alistapart.com/</a><!-- m -->). If you still want some assistance, post another topic in this forum.
Originally posted by Larzman
IE is actually displaying it the way I like, but no one really uses that piece of crap browser, do they?!?
*sigh* If only that were true... September 2004 browser usage stats (<!-- m --><a class="postlink" href="http://www.thecounter.com/stats/2004/September/browser.php">http://www.thecounter.com/stats/2004/Se ... rowser.php</a><!-- m -->)Originally posted by Larzman
IE is actually displaying it the way I like, It may be the way you like, but IE is displaying it incorrectly. Trust me on that one.I know IE sux, but I have to test for it also on my company website - unfortunately! I've heard that before, page displays only well in IE, that's because IE is broken.
Would you like me to post the page & CSS I'm using?