How do you use Wordpress Custom Area to specify content alignment?

I've within the header:

$pagealign = get_post_meta($id, 'pagealign', false);
if (!empty($pagealign) && is_single())
 {
   if ($pagealign=="center")
     {
       //how to specify css for #pagecontent within php
     }
  }

I acquired exactly what the problem was: get_publish_meta should finish with TRUE rather than FALSE

$pagealign = get_post_meta($id, 'pagealign', true);
     if (!empty($pagealign) && is_single())
    {
    if ($pagealign=="center") echo '<style type="text/css">#page-wrap {left:0px;margin-left:auto;margin-right:auto;position:relative;}</style>' ;
    if ($pagealign=="right") echo '<style type="text/css">#page-wrap {left:auto;right:30px;}</style>' ;
    }

I would suggest setting the end result like a variable share [g+] share [facebook] share [tw]

How do you use Wordpress Custom Area to specify content alignment?

I've within the header:

$pagealign = get_post_meta($id, 'pagealign', false);
if (!empty($pagealign) && is_single())
 {
   if ($pagealign=="center")
     {
       $align = $pagealign
     }
  }

Then based on just what you mean by align you should use that variable to define it using inline css...

so Im just speculating text-align

<div id='somediv' style='text-align:<?php echo $pagealign?>;'></div>