Old 19-02-2007, 20:34   #1 (permalink)
stylin328
Senior Member
 
stylin328's Avatar
 
Join Date: Jun 2006
Location: NYC
Posts: 332
Send a message via AIM to stylin328
New to css

Im new to css. Can someone show me how to center this website. I tryed the container thing but am obviously doing something wrong. I cant seem to figure out the difference between id's and classes and spans. Any help is appreciated.

Site:
Quote:
<body>
<div class="mainposition">
<div class="regi07-1slice-01_">
<img id="regi07_1slice_01" src="images/regi07_1slice_01.jpg" width="199" height="129" alt="" /> </div>
<div class="regi07-1slice-02_">
<img id="regi07_1slice_02" src="images/regi07_1slice_02.jpg" width="28" height="129" alt="" /> </div>
<div class="regi07-flashbackgrd_">
<img id="regi07_flashbackgrd" src="images/regi07_flashbackgrd.jpg" width="510" height="129" alt="" /> </div>
<div class="regi07-buymadeeay_">
<img id="regi07_buymadeeay" src="images/regi07_buymadeeay.jpg" width="199" height="257" alt="" /> </div>
<div class="regi07-1slice-05_">
<img id="regi07_1slice_05" src="images/regi07_1slice_05.jpg" width="538" height="1" alt="" /> </div>
<div class="regi07-1slice-06_">
<img id="regi07_1slice_06" src="images/regi07_1slice_06.jpg" width="537" height="256" alt="" /> </div>
<div class="regi07-1slice-07_">
<img id="regi07_1slice_07" src="images/regi07_1slice_07.jpg" width="1" height="256" alt="" /> </div>
<div class="regi07-1slice-08_">
<img id="regi07_1slice_08" src="images/regi07_1slice_08.jpg" width="199" height="517" alt="" /> </div>
<div class="regi07-1slice-09_">
<img id="regi07_1slice_09" src="images/regi07_1slice_09.gif" width="538" height="517" alt="" /> </div>
<div class="regi07-1slice-10_">
<img id="regi07_1slice_10" src="images/regi07_1slice_10.gif" width="737" height="43" alt="" /> </div>
<div class="regi07-1slice-11_">
<img id="regi07_1slice_11" src="images/regi07_1slice_11.jpg" width="737" height="20" alt="" /> </div>
<div class="regi07-1slice-12_">
<img id="regi07_1slice_12" src="images/regi07_1slice_12.jpg" width="737" height="1" alt="" /> </div>
</div>
</body>

CSS
Quote:
#container {
text-align: center;
}


body {
background-image: url(images/regiibackgrd.jpg);


}

div.mainposition {
position:absolute;
left:0px;
top:0px;
width:740px;
height:948px;
}

div.regi07-1slice-01_ {
position:absolute;
left:0px;
top:0px;
width:199px;
height:129px;
}

div.regi07-1slice-02_ {
position:absolute;
left:199px;
top:0px;
width:28px;
height:129px;
}

div.regi07-flashbackgrd_ {
position:absolute;
left:227px;
top:0px;
width:510px;
height:129px;
}

div.regi07-buymadeeay_ {
position:absolute;
left:0px;
top:129px;
width:199px;
height:257px;
}

div.regi07-1slice-05_ {
position:absolute;
left:199px;
top:129px;
width:538px;
height:1px;
}

div.regi07-1slice-06_ {
position:absolute;
left:199px;
top:130px;
width:537px;
height:256px;
}

div.regi07-1slice-07_ {
position:absolute;
left:736px;
top:130px;
width:1px;
height:256px;
}

div.regi07-1slice-08_ {
position:absolute;
left:0px;
top:386px;
width:199px;
height:517px;
}

div.regi07-1slice-09_ {
position:absolute;
left:199px;
top:386px;
width:538px;
height:517px;
}

div.regi07-1slice-10_ {
position:absolute;
left:0px;
top:903px;
width:737px;
height:43px;
}

div.regi07-1slice-11_ {
position:absolute;
left:0px;
top:946px;
width:737px;
height:20px;
}

div.regi07-1slice-12_ {
position:absolute;
left:0px;
top:966px;
width:737px;
height:1px;
}
  Reply With Quote
Old 20-02-2007, 04:03   #2 (permalink)
Paul
Junkie[scum]
 
Paul's Avatar
 
Join Date: Oct 2006
Location: location, location
Posts: 1,803
first you will have to put all of your div's in the container. at the moment there is no container
HTML Code:
<div id="container"> all the divs and other code go in here </div>

then put this in the css
Code:
#container { margin : 0 auto;}
  Reply With Quote
Old 20-02-2007, 11:45   #3 (permalink)
stylin328
Senior Member
 
stylin328's Avatar
 
Join Date: Jun 2006
Location: NYC
Posts: 332
Send a message via AIM to stylin328
and that code with #container will center it as well.?

Thanks for your help.
  Reply With Quote
Old 20-02-2007, 12:57   #4 (permalink)
Paul
Junkie[scum]
 
Paul's Avatar
 
Join Date: Oct 2006
Location: location, location
Posts: 1,803
that will center the whole site, the text align will center the text
  Reply With Quote
Old 20-02-2007, 13:20   #5 (permalink)
stylin328
Senior Member
 
stylin328's Avatar
 
Join Date: Jun 2006
Location: NYC
Posts: 332
Send a message via AIM to stylin328
thanks...
  Reply With Quote
Old 20-02-2007, 13:23   #6 (permalink)
Paul
Junkie[scum]
 
Paul's Avatar
 
Join Date: Oct 2006
Location: location, location
Posts: 1,803
nae bother mucker
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8