Jump to content

What Did I Do Wrong? Please Help Me


asgerregsa
 Share

Recommended Posts

Hi everyoneI am making a website from scratch and now I have changed something on the website. See, before I changed it, I used a lot of "position:absolute" in the <div> tags but sinnce I was doing it on top of the table I figured out that it didn't work out so well. I want the banner to be on top of the table and I want the buttons to be in the top of the table.Here is the code from before I changed it :

<html>	<head>		<style type="text/css">ul{list-style-type:none;margin:0;padding:0;padding-top:6px;padding-bottom:6px;}li{display:inline;}a:link,a:visited{font-weight:bold;color:#FFFFFF;background-color:#000000;text-align:center;padding:6px;text-decoration:none;text-transform:uppercase;font-family:Arial;}a:hover,a:active{background-color:#858585;}p{font-family:"Arial";color: #FFB300;}</style>		<!--det følgende er tags/keywords som gør det nemmere for google at finde siden--><meta name="keywords" content="card, tricks, card tricks, magic tricks, magic, tricks, mismag822, thecardtrickteacher, cardtrickteacher, dananddave.com, ellusionist.com, free, free card magic, free card tricks, free card tricks revealed, asgerregsa, asger, s, velling, asger s. velling, asger s velling" />		<title>			Dette er min side		</title>		<!--det følgende er et favicon--><link rel="shortcut icon" href="favicon.ico" />	</head>	<body>		<center>			Note: This website works best <u>without</u> fullscreen!		</center>		<table border="0" cellpadding="10" cellspacing="10" width="100%" height="100%"><tr><td align="center" valign="middle">    <table border="1" bgcolor="black" bordercolor="#FFB300" width="802" height="500"><tr><td>		<div style="position:absolute;top:48px;left:104px;"><!--her er billedet--><img src="asgersbillede.jpg" /></div>		<div style="position:absolute;top:198px;background:#000000;"><ul><li><a href="home.html">Home</a></li><li><a href="links.html">Links</a></li><li><a href="contact.html">Contact me</a></li><li><a href="about.html">About</a></li><li><a href="videos.html">Videos</a></li></ul></div>		</td></tr></table>		</td></tr></table>	</body></html>

And here is the code I changed it to :

<html>	<head>		<style type="text/css">ul{list-style-type:none;margin:0;padding:0;padding-top:6px;padding-bottom:6px;}li{display:inline;}a:link,a:visited{font-weight:bold;color:#FFFFFF;background-color:#000000;text-align:center;padding:6px;text-decoration:none;text-transform:uppercase;font-family:Arial;}a:hover,a:active{background-color:#858585;}p{font-family:"Arial";color: #FFB300;}</style>		<!--det følgende er tags/keywords som gør det nemmere for google at finde siden--><meta name="keywords" content="card, tricks, card tricks, magic tricks, magic, tricks, mismag822, thecardtrickteacher, cardtrickteacher, dananddave.com, ellusionist.com, free, free card magic, free card tricks, free card tricks revealed, asgerregsa, asger, s, velling, asger s. velling, asger s velling" />		<title>			Dette er min side		</title>		<!--det følgende er et favicon--><link rel="shortcut icon" href="favicon.ico" />	</head>	<body>		<center>				<!--her er billedet--><img src="asgersbillede.jpg" />				<table border="0" cellpadding="10" cellspacing="10" width="100%" height="100%"><tr><td align="center" valign="middle">    <table border="0" bgcolor="black" bordercolor="#FFB300" width="800" height="500"><tr><td>		<ul><li><a href="home.html">Home</a></li><li><a href="links.html">Links</a></li><li><a href="contact.html">Contact me</a></li><li><a href="about.html">About</a></li><li><a href="videos.html">Videos</a></li></ul></div></center>		</td></tr></table>		</td></tr></table>	</body></html>

The quick eye will see that I used no "position:absolute" in the last one. I want the banner to be on top of the table and I want the buttons to be in the top of the table, so if anyone will help me I will be really happy!Thank you

Link to comment
Share on other sites

I don't get what you're doing. Can't you just use CSS for all of that (i.e., the centering, getting rid of the table, using divs, etc)? What is/are the table(s) for? You also have a closing div tag with no opening div tag.Look at my signature, you are missing two key components when it comes to web designing. Having a doctype, and validating your code.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...