PDA

View Full Version : trying to teach myself CSS, any explain how to center this...


oneeightleft
08-19-2011, 04:51 PM
So i'm obviously new, I have been working on my skills and just trying to practice while i'm at working..

the wrapper div is not centering for me, i've tried a few different things to try and fix it.

granted I only have ie8 to test it at work so it's possible some of the stuff i'm doing is working, i just can't tell...

<html>
<head>
</head>

<body>
<style type="text/css">


body{
background-color: 6E6A6B;

}
#full{

}

#wrapper{
position: static;
background-color: 357EC7;
align: center;
width: 50%;

}

#header{
font-size: 36;
text-align: center;
width: 900 px;
height: 100 px;

}
#contentleft{
width: 50 px;
float: left;

}

#contentright{
margin: 50 px;
float: right;

}

#footer{
width: 900px;
height: 100 px;

}

</style>
<div id="full">
<div id="wrapper">
<div id="header">
This is the header

</div>
<div id="contentleft">
This is content left
<p>
this is more content
<p>

content
<p>
content

</div>
<div id="contentright">
this is content right. dubu9afbeuiwab fguiarbgpiutbauipgntuipaenvbuipearn pb uip eauipguiea buipe abi a gjiera gnerioang eriopang gnuergnuens gn utntur nuh hrtsnthrhnrwt suitnsuihsuit hn srnuirh nusrihnurtnhwnuihnruisnhsntu ush hn hnhusr nuisn hrui

</div>
<div id="footer">
this is the footer

</div>
</div>

</div>




</body>
</html>

Corrosive
08-19-2011, 06:13 PM
#wrapper{
position: relative;
background-color: 357EC7;
margin: 0 auto;
width: 50%;

}

Austintxous
08-26-2011, 07:08 PM
Don't just try to teach yourself html and css. Any time you have a question, type it into GOOGLE. You'll be amazed at what you find. There are some awesome people out there who must have very understanding mothers, wives, GF's or a trust fun, because all they seem to do is answer questions for people who want to learn internet development. Whatever it is, its like a huge university and its all free. When you find a site with good answers, make a bookmark so you can go directly to that place in the future... And, you should install a copy of every major browser: IE, Firefox, Chrome, Safari and Opera and test in ALL of them once you have it sort of stable in IE or whatever you prefer. They're all free. But, they don't all act the same, and if you ever want your page to work as a public site, it has to work in all these browsers.

Corrosive
08-27-2011, 06:30 AM
This is good advice but just be aware that some of the quality of advice and tutorials you find with Google can be poor. Sorting the wheat from the chaff with what your search returns is part of the skill set.