Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8

Thread: table troubles

  1. #1
    New Coder
    Join Date
    Jan 2010
    Posts
    76
    Thanks
    3
    Thanked 0 Times in 0 Posts

    table troubles

    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

  • #2
    Regular Coder
    Join Date
    Nov 2009
    Posts
    202
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by metathirteen View Post
    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):

    Code:
      <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:

    Code:
     <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.
    Last edited by cyborg360; 01-01-2010 at 08:22 AM.

  • #3
    New Coder
    Join Date
    Jan 2010
    Posts
    76
    Thanks
    3
    Thanked 0 Times in 0 Posts
    thanks a bunch, guy =D
    i knew there was a way to do it but i couldnt remember lol. drove me nuts

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Hi there,

    Don't you know why using tables for layout is very bad?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    New Coder
    Join Date
    Jan 2010
    Posts
    76
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    Hi there,

    Don't you know why using tables for layout is very bad?
    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?
    Last edited by metathirteen; 01-01-2010 at 05:19 PM.

  • #6
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by metathirteen View Post
    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.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Here's a start metathirteen, still needs the drop shadow applied but it's a start.

    Code:
    <!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.


    ...
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #8
    New Coder
    Join Date
    Jan 2010
    Posts
    76
    Thanks
    3
    Thanked 0 Times in 0 Posts
    awesome thanks a bunch
    im starting to understand this stuff a little better =D


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •