Pobega
03-29-2007, 10:42 PM
Well I'm trying to build a modular text database blog software, and someone suggested using CSS instead of tables since it's going to be modular.
I've tried converting, but I'm not able to get it working right.
CSS (http://i109.photobucket.com/albums/n50/Pobega/scrot-Mar-29-07-053632.jpg) vs. Tables (http://i109.photobucket.com/albums/n50/Pobega/scrot-Mar-29-07-053636.jpg)
Here is the CSS:
body {
margin:0;
padding:0;
font-size:100%;
font-family:sans-serif;
}
#table {
width:90%;
display:table;
}
#banrow {
display:table-row;
}
#tabrow {
display:table-row;
}
#bodycol {
display:table-cell;
width:75%;
}
#links {
display:table-cell;
width:25%;
}
And the HTML code(s):
With CSS:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Title Goes Here</title>
<link rel="shortcut icon" href="favicon.ico">
<?php
if($_COOKIE['poblog_css']) {
echo ' <link rel="stylesheet" href="' . $_COOKIE['poblog_css'] . '.css">';
}
else {
echo ' <link rel="stylesheet" href="default.css">';
}
?>
<meta name="Keywords" content="list, like, this">
<meta name="Description" content="Description for search engines goes here">
</head>
<body>
<center>
<div id="table">
<div id="banrow">
<center>
<img src="banner.jpg" alt="Banner goes where?" />
</center>
</div>
<div id="tabrow">
<div id="bodycol">
Body here.
</div>
<div id="links">
Links here
</div>
</div>
</div>
</center>
</body>
</html>
With tables:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Title Goes Here</title>
<link rel="shortcut icon" href="favicon.ico">
<?php
if($_COOKIE['poblog_css']) {
echo ' <link rel="stylesheet" href="' . $_COOKIE['poblog_css'] . '.css">';
}
else {
echo ' <link rel="stylesheet" href="default.css">';
}
?>
<meta name="Keywords" content="list, like, this">
<meta name="Description" content="Description for search engines goes here">
</head>
<body>
<center>
<table width="90%">
<tr>
<center>
<img src="banner.jpg" alt="Banner goes where?" />
</center>
</tr>
<tr>
<td width="75%">
Body here.
</td>
<td width="25%">
Links here
</td>
</tr>
</table>
</center>
</body>
</html>
Any help would be appreciated, thank you!
I've tried converting, but I'm not able to get it working right.
CSS (http://i109.photobucket.com/albums/n50/Pobega/scrot-Mar-29-07-053632.jpg) vs. Tables (http://i109.photobucket.com/albums/n50/Pobega/scrot-Mar-29-07-053636.jpg)
Here is the CSS:
body {
margin:0;
padding:0;
font-size:100%;
font-family:sans-serif;
}
#table {
width:90%;
display:table;
}
#banrow {
display:table-row;
}
#tabrow {
display:table-row;
}
#bodycol {
display:table-cell;
width:75%;
}
#links {
display:table-cell;
width:25%;
}
And the HTML code(s):
With CSS:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Title Goes Here</title>
<link rel="shortcut icon" href="favicon.ico">
<?php
if($_COOKIE['poblog_css']) {
echo ' <link rel="stylesheet" href="' . $_COOKIE['poblog_css'] . '.css">';
}
else {
echo ' <link rel="stylesheet" href="default.css">';
}
?>
<meta name="Keywords" content="list, like, this">
<meta name="Description" content="Description for search engines goes here">
</head>
<body>
<center>
<div id="table">
<div id="banrow">
<center>
<img src="banner.jpg" alt="Banner goes where?" />
</center>
</div>
<div id="tabrow">
<div id="bodycol">
Body here.
</div>
<div id="links">
Links here
</div>
</div>
</div>
</center>
</body>
</html>
With tables:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Title Goes Here</title>
<link rel="shortcut icon" href="favicon.ico">
<?php
if($_COOKIE['poblog_css']) {
echo ' <link rel="stylesheet" href="' . $_COOKIE['poblog_css'] . '.css">';
}
else {
echo ' <link rel="stylesheet" href="default.css">';
}
?>
<meta name="Keywords" content="list, like, this">
<meta name="Description" content="Description for search engines goes here">
</head>
<body>
<center>
<table width="90%">
<tr>
<center>
<img src="banner.jpg" alt="Banner goes where?" />
</center>
</tr>
<tr>
<td width="75%">
Body here.
</td>
<td width="25%">
Links here
</td>
</tr>
</table>
</center>
</body>
</html>
Any help would be appreciated, thank you!