Topic: Website Help

Hey, does anyone know how to center align an entire site? My site is currently left aligned. Please help. Thanks

Re: Website Help

Put it in a div wrapper WITH a set width and give it a right and left margin of auto.

Edit - instead of WITH, I had written 'or' which makes no sense and was a typo.

Last edited by Andrea (formerly Thelma) (2009-10-22 13:49:23)

Re: Website Help

I can't give you specific advice without knowing exactly what your site looks like, but most often it's done by adding "margin: 0 auto;" to the wrapper div. This adds "auto" left and right margins, centering the site.

Post a link and I should be able to provide you the exact code.

Re: Website Help

CSS:

#page-container {width: 800px; margin: 0 auto;} // specify a width and set horizontal margins to auto
#content {font-size: 12px;} // just an example

HTML:

<div id="page-container">
<div id="content">
<p>Some content here</p>
</div>
</div>

Re: Website Help

one more thing. how can i put text side by side with one another without it wrapping together to make one big paragraph?

Re: Website Help

You could put it in separate divisions - float one right, one left. - Or float one to one side and position the other.

Re: Website Help

did you mean something like this?

<div id=123A style="float: left; text-align: left;">ABC</div>
<div id=123B style="float: right; text-align: right;">DEF</div>

Re: Website Help

alphynityx wrote:

did you mean something like this?

<div id=123A style="float: left; text-align: left;">ABC</div>
<div id=123B style="float: right; text-align: right;">DEF</div>

Yes, that is one way to do it. The id value would need "" around it though.

Re: Website Help

yea, thanks, but it didnt work for me..it would end up looking like this

ABC
                              DEF

Re: Website Help

does it not work with a link and with text?

Re: Website Help

Don't start an ID name with a number.

Just so you see what you have, give each div a different background color, so you can see where they are - my guess is they are too wide and don't fit next to each other - but the color should make that more clear.  Is there a link to your page?

Re: Website Help

wow..ok thanks so much. i got it. i just had to change some of the html in the beginning of the body. thank u thank u

Re: Website Help

thanks everyone, you've been great help. I would put a link up to the webpage, but it's currently pw protected by the company. I'm just trying to get everything working properly before they make it live.

Can anyone give me some info on dynamically generated title tags and meta tags. I've been trying to read some stuff online, but i can't seem to comprehend. thanks again.

Re: Website Help

alphynityx wrote:

Can anyone give me some info on dynamically generated title tags and meta tags. I've been trying to read some stuff online, but i can't seem to comprehend. thanks again.

I'm not exactly sure what you mean, but you could put the meta tag content like this
<title>Company A website</title>
<meta name="keywords" content="TV; Radio"/>
<meta name="description" content="Product descriptions"/>
in a separate file called, say, titleandmeta.inc

and then put this in every page head section instead of the tags
<?php include ("titleandmeta.inc"); ?>

and rename every main page with a .php filename extension; then you only have to edit the .inc page to change the display.