Go Back   Free website templates > Web Template Help > HTML - XHTML - CSS

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-03-2009, 05:50 PM
djwilson's Avatar
Senior Member
 
Join Date: Apr 2008
Location: United Kingdom
Posts: 389
djwilson is on a distinguished road
Send a message via Skype™ to djwilson
Default center dj

Hi,


im trying to center:

www.youtubedjchannel.com/business.php

to the center of the page but having know luck.
Reply With Quote
  #2 (permalink)  
Old 09-03-2009, 09:21 PM
bmcoll3278's Avatar
Senior Member
 
Join Date: Jun 2009
Posts: 303
bmcoll3278 is on a distinguished road
Default

ok a few things

first move your style sheet up it needs to be between <head> and </head>

Hear is your sheet now
Code:
<style type="text/css"> 
.img1 { text-align: center }
 
.adspace_right {
	float: right;
	margin: 180px 160px 10px 10px;
}
 
.adspace_left {
	float: left;
	margin: 180px 10px 10px 160px;
}
 
</style>

Make it this

Code:
<style type="text/css"> 
.img1 { text-align: center }
 
.adspace_right {
	float: right;
	margin: 180px 160px 10px 10px;
}
 
.adspace_left {
	float: left;
	margin: 180px 10px 10px 160px;
}
 div.centered {
 text-align: center;
 border-width: 0px;
}
 
</style>

now right after the body tag<body>

change it to

Code:
<body><div class="centered">

and at the bottom of the page

Code:
</div></body>
every thing inside that div will be centered.
__________________
I hope to build a site with something for every body
www.bmcoll.com
Reply With Quote
  #3 (permalink)  
Old 09-03-2009, 09:34 PM
djwilson's Avatar
Senior Member
 
Join Date: Apr 2008
Location: United Kingdom
Posts: 389
djwilson is on a distinguished road
Send a message via Skype™ to djwilson
Default

Hi, it hasnt worked?
Reply With Quote
  #4 (permalink)  
Old 09-04-2009, 05:04 PM
bmcoll3278's Avatar
Senior Member
 
Join Date: Jun 2009
Posts: 303
bmcoll3278 is on a distinguished road
Default

I am sorry I should have looked harder before my answer.

you know what they say about (ass u me)

I pulled your style sheet and I am not a template pro but I can see that everything is positioned by the style sheet
You will see lines that look like this
margin: 33px 40px 41px 85px;

If you make a copy you can go back to in case you screw up then start playing with these numbers in your style sheet you will start moving things around on the page. If you mess it up just upload a copy that you saved and start again.
Reply With Quote
  #5 (permalink)  
Old 09-04-2009, 10:00 PM
ishkey's Avatar
Mod - Designer
 
Join Date: Aug 2007
Location: ishkey.com
Posts: 3,499
ishkey will become famous soon enough
Default

It could be because in the original css file it has outer, wrapper (something for ie6 and below) and header sectors that are missing.
The one which centers it is the wrapper, now a days you just set the body sector something like this (wrapper be gone)

#body{
width:774px; margin:0 auto;
}

Think of the pic below of the upside down pyramid, take away the top layer holding everything down and the lower stuff rushes up to file in it's place.
Attached Images
 
__________________

MySite
Reply With Quote
  #6 (permalink)  
Old 09-05-2009, 09:16 PM
djwilson's Avatar
Senior Member
 
Join Date: Apr 2008
Location: United Kingdom
Posts: 389
djwilson is on a distinguished road
Send a message via Skype™ to djwilson
Default

Thanks for the help but im going in circles here
Reply With Quote
  #7 (permalink)  
Old 09-05-2009, 09:20 PM
ishkey's Avatar
Mod - Designer
 
Join Date: Aug 2007
Location: ishkey.com
Posts: 3,499
ishkey will become famous soon enough
Default

clockwise or counter-clockwise it's important you know because where CovertPea lives the water goes down the drain backwards from the way it goes down up here.
That's confusing..........
__________________

MySite
Reply With Quote
  #8 (permalink)  
Old 09-05-2009, 09:37 PM
djwilson's Avatar
Senior Member
 
Join Date: Apr 2008
Location: United Kingdom
Posts: 389
djwilson is on a distinguished road
Send a message via Skype™ to djwilson
Default

Any clear up, sorry about the dumbness
Reply With Quote
  #9 (permalink)  
Old 09-05-2009, 10:40 PM
ishkey's Avatar
Mod - Designer
 
Join Date: Aug 2007
Location: ishkey.com
Posts: 3,499
ishkey will become famous soon enough
Default

I was just tring to lighten things up.
Sorry, I know how it gets when you are pullig your hair out.
What screen size are you coding for?
post your css and index.html or whatever - will look at it.
__________________

MySite
Reply With Quote
  #10 (permalink)  
Old 09-05-2009, 10:55 PM
djwilson's Avatar
Senior Member
 
Join Date: Apr 2008
Location: United Kingdom
Posts: 389
djwilson is on a distinguished road
Send a message via Skype™ to djwilson
Default

Dave, sorry, I wasnt having a pop at you.

mmm, not sure sorry, 17" screen if that helps.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:19 AM.