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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Centering a table in css help.

    For some reason i cant center this table, it wont center for some reason, i tried div align="center" and everything. Any help would be appreciated. and i mean the actual table, not to center the text.

    Heres the css.

    Code:
    <style type="text/css">
    <!--
    
    #Table_01 {
    	position:absolute;
    	width:890px;
    	height:159px;
    
    }
    
    #td-01 {
    	position:absolute;
    	left:0px;
    	top:0px;
    	width:890px;
    	height:114px;
    }
    
    #td-02 {
    	position:absolute;
    	left:0px;
    	top:114px;
    	width:19px;
    	height:25px;
    }
    
    #td-03 {
    	position:absolute;
    	left:19px;
    	top:114px;
    	width:65px;
    	height:25px;
    }
    
    #td-04 {
    	position:absolute;
    	left:84px;
    	top:114px;
    	width:68px;
    	height:25px;
    }
    
    #td-05 {
    	position:absolute;
    	left:152px;
    	top:114px;
    	width:80px;
    	height:25px;
    }
    
    #td-06 {
    	position:absolute;
    	left:232px;
    	top:114px;
    	width:71px;
    	height:25px;
    }
    
    #td-07 {
    	position:absolute;
    	left:303px;
    	top:114px;
    	width:72px;
    	height:25px;
    }
    
    #td-08 {
    	position:absolute;
    	left:375px;
    	top:114px;
    	width:85px;
    	height:25px;
    }
    
    #td-09 {
    	position:absolute;
    	left:460px;
    	top:114px;
    	width:74px;
    	height:25px;
    }
    
    #td-10 {
    	position:absolute;
    	left:534px;
    	top:114px;
    	width:338px;
    	height:25px;
    	background-image: url(images/test_10.gif)
    }
    
    #td-11 {
    	position:absolute;
    	left:872px;
    	top:114px;
    	width:18px;
    	height:25px;
    }
    
    #td-12 {
    	position:absolute;
    	left:0px;
    	top:139px;
    	width:890px;
    	height:20px;
    }
    a {
    	font-family: Verdana;
    	font-size: 9px;
    	color: white;
    }
    a:link {
    	text-decoration: none;
    	font-size: 9px;
    	color:#FFFFFF;
    }
    a:visited {
    	text-decoration: none;
    	font-size: 9px;
    	color: white;
    }
    a:hover {
    	text-decoration: none;
    	font-size: 9px;
    	color: black;
    }
    a:active {
    	text-decoration: none;
    	font-size: 9px;
    	color: white;
    }
    img {
    	border:0px;
    }
    </style>

  • #2
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts
    tables exist for this. try adding margin:0 auto;

  • #3
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yea, that didnt work neither.

  • #4
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts
    could you please post either a link or the relevant html, i can't see just from the css how the page is set up

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Karambunai Nexus
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i noticed something. You actually named it's ID as "Table_01"? and there are alot of dashes "-". Try removing them. Just a suggestion. I usually avoid using underscores and dashes in CSS.
    nisi dominus fustra

    www.oopsmural.com


  •  

    Posting Permissions

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