View Full Version : How do you..


bloo_moon
04-18-2007, 05:28 AM
Just wondering how one goes about making everything in the website in the middle?

example: http://www.muss.ae/

thanks in advance!

Ges
04-18-2007, 04:50 PM
Hi bloo_moon,
There are many ways to accomplish this. But the best way would be to use some CSS. Then you can 'wrap' the body of your code around a <div>.
Here is a SIMPLE example;


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Page title</title>

<style type="text/css">
<!--

body {
background-image: url(pic1.jpg);
background-repeat: no-repeat;
background-attachment: fixed;
}

#code_wrap {
position:absolute;
background-color: #AF0101;
border: 5px #004400 solid;
width: 75%;
height:100%;
top:100px;
left:15%;
}
-->
</style>

</head>
<body>
<div id="code_wrap">

<center><h1>Main Code Here</h1></center>

</div>

</body>
</html>


This will allow a fixed background covering the screen and then all the rest of the page will be 'contained' within the <div id="code_wrap"> settings.

For more easy info on CSS;

http://www.w3schools.com/css/default.asp

Regards,
Ges.

PS:
Some sites use 'container' as a descriptor of the CSS section and comes from the w3C standards describing 'container classes'. But that's mainly for Object Oriented Programming ( OOP ). Container classes, for example, are used extensively in the structure constructs of C++ and Java ( not meaning Javascript here - Java is totally different! ).

Inglis
04-18-2007, 05:53 PM
ahh this is what i need aswell :D