Hello, So far i have this : <html> <head> <title>Welcome To My site! </title> </head> <body> <p> <font size="4" color="#FFFFFF"> Welcome To My Site.com. A Multiplayer Online Game Where You Can Battle It Out! </font> </p> <body bgcolor="black"> </body> </html> Code (markup): Now, i would like to insert a banner at the top. How would i go about this? Say i designed my own banner. How would i make this stretch to the users browser? What would the code be? I've looked on W3 but couldn't find how to do it. Thanks.
first of all, get rid of the: <body bgcolor="black"> Code (markup): You don't need duplicate body tags. If anything, call that up in the first body tag. Or better yet, just use CSS. <style> body{ background: #000000; } #head{ background-image: url("images/head.gif"); background-repeat: repeat-x; height: 25px; } </style> Code (markup): Put that somewhere in the head of your page. In the "head" ID, you will need to make the background-image go to your appropriate image, and the height equal to the height of your background image. Then, wherever you want your header to be put this in your HTML code: <div id="head">Text here if you need it</div> Code (markup): All together, it would look something like this... though I would recommend you to look into CSS and XHTML. <html> <head> <style> body{ background: #000000; } #head{ background-image: url("images/head.gif"); background-repeat: repeat-x; height: 25px; } </style> <title>Welcome To My site! </title> </head> <body> <div id="head">Some text if you need it</div> <p> <font size="4" color="#FFFFFF"> Welcome To My Site.com. A Multiplayer Online Game Where You Can Battle It Out! </font> </p> </body> </html> Code (index.html): Hope that helps
remove the </head> and replace with </div> like this though <div id="head">Some text if you need it</div> as you have repeated the </head> twice
Oops, I was wondering what you where talking at till I looked over my code. Good thing you thought that or Agent_Smith would have though "Stupid CSS, doesn't even work"
Just a tip: I'm guessing most people here use Content Management Systems (CMS) to publish content. There's nothing wrong learning to hand code HTML, but CMS is the way to go if you want to get seriuos.
Now that's really serious. I think that guy needs to figure out what CSS is before he gets into that.
I learned PHP before I was completely firmiliar with CSS A bit out of the ordinary, I know, but it can be done. PHP and CSS handle completely different things, by learning CSS first he will not be better prepared to start coding PHP.
Hi, Thanks alot! Hey, i have a name. Also i started to look over PHP a few weeks ago. I know the real basic stuff e.g variables ect.