...

View Full Version : table troubles



metathirteen
01-01-2010, 07:34 AM
im making a site for myself and im still pretty new to this stuff. im trying to give it like a dos sorta look. right now im using tables for these boxes i made but i cant figure out how to change the spacing for when i type in them. it always just comes up in the middle of the table.

can anyone help me out?
heres a link to my site. see how navi box is in the middle?
http://switcharoo.agilityhoster.com/dossite.html

cyborg360
01-01-2010, 07:47 AM
im making a site for myself and im still pretty new to this stuff. im trying to give it like a dos sorta look. right now im using tables for these boxes i made but i cant figure out how to change the spacing for when i type in them. it always just comes up in the middle of the table.

can anyone help me out?
heres a link to my site. see how navi box is in the middle?
http://switcharoo.agilityhoster.com/dossite.html

Here are a couple things you can do below. Others may have better ideas for achieving the same results.

One thing you can do is add a paragraph as in this code below (the "<p>" is a symbol for paragraph):


<TR>
<TD height="118" bgcolor="#0000CC">&nbsp;</TD>
<TD bgcolor="#0000CC">
<p align="right">navi box</p></TD>
<TD bgcolor="#000000">&nbsp;</TD>
</TR>


I've aligned the text to the right.

Another thing you can do now is align it to the top of that table. This is how you'd do it in expression web 3:
1. right click the <p> box on your display
2. click cell properties.
3. go to "vertical alignment" and select top.

The code for both these operations looks like this:


<TR>
<TD height="118" bgcolor="#0000CC">&nbsp;</TD>
<TD bgcolor="#0000CC" valign="top">
<p align="right" height: 13px;">navi box</FONT></TD>
<TD bgcolor="#000000">&nbsp;</TD>
</TR>


Another way you can do it which may be more complicated in the short run but I think more people will recommend for better results in the long run is to use the CSS property text-align (http://www.w3schools.com/CSS/pr_text_text-align.asp).

metathirteen
01-01-2010, 08:33 AM
thanks a bunch, guy =D
i knew there was a way to do it but i couldnt remember lol. drove me nuts

abduraooft
01-01-2010, 08:36 AM
Hi there,

Don't you know why using tables for layout is very bad (http://www.hotdesign.com/seybold/)?

metathirteen
01-01-2010, 05:03 PM
Hi there,

Don't you know why using tables for layout is very bad (http://www.hotdesign.com/seybold/)?

i tried using css to do make the 3d boxes but i couldnt figure it out.
i have no idea how else to do it :(
is there an easier/better way?

Excavator
01-01-2010, 05:12 PM
i have no idea how else to do it :(
is there an easier/better way?

That website that ab linked you to is not just about condeming tables. It also goes into some detail about the more modern methods of web building.
Did you read it?

Another link about tables in my sig below.

Excavator
01-01-2010, 05:44 PM
Here's a start metathirteen, still needs the drop shadow applied but it's a start.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body {
font: 100% "Comic Sans MS";
background: #000;
color: #FFF;
}
* {
margin: 0;
padding: 0;
border: 0;
}
#container {
height: 560px;
width: 760px;
margin: 30px auto;
padding: 20px;
background: url(http://switcharoo.agilityhoster.com/bg.jpg);
font-size: 0.8em;
}
#navbox {
width: 177px;
float: left;
padding: 10px;
background: #00f;
list-style: none;
}
#navbox li {
width: 177px;
text-align: center;
line-height: 20px;
}
#navbox li a {
text-decoration: none;
display: block;
}
#navbox li a:hover {color: #f00;}
#contentbox {
margin: 0 0 0 240px;
background: #00f;
}
</style>
</head>
<body>
<div id="container">
<ul id="navbox">
<li><a href="#">link one</a></li>
<li><a href="#">link two</a></li>
<li><a href="#">link three</a></li>
<li><a href="#">link four</a></li>
<li><a href="#">link five</a></li>
<li><a href="#">link six</a></li>
<li><a href="#">link seven</a></li>
</ul>
<div id="contentbox">
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna
aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo
duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna
aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no
sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo
duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
<!--end contentbox--></div>
<!--end container--></div>
</body>
</html>

See a demo I have on a simple drop shadow here (http://nopeople.com/CSS/drop_shadow/index.html).


...

metathirteen
01-06-2010, 05:09 AM
awesome thanks a bunch
im starting to understand this stuff a little better =D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum