SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question center content in one column box (head, content, foot)

    Hello,

    I am fairly new a using CSS. I have created a one column box with a header, content and footer. I would like to center the content within the frame, but have no idea how to do so. I am having a hard time with the float. Any help would be appreciated.

    Thanks, sckeels


    #px1_frame {
    border: 0px solid #333;
    margin-left: 20px;
    width:745px;
    font-family : Arial, Helvetica, Verdana;}

    /** header **/
    #px1_header {
    border: 0px solid red; /* 1px solid #333; */
    margin-left: 0px;
    /* width: 740px; */
    color: #000;
    border-bottom: 1px solid #333;
    height: 90px;
    font-size: 9pt;}


    /** content **/
    #px1_content {
    border: 0px solid green; /* solid green; */
    float:left;
    /* width: 740px; */
    margin-top: 6px;
    padding-bottom: 1em;
    padding-left: 6px;
    padding-right: 6px;
    color: #000;
    background-color: #FFFFFF;
    font-size: 9pt;}


    /** footer **/
    #px1_footer {
    border: 0px solid red; /* 1px solid #333; */
    clear: both;
    /* width: 740px; */
    text-align: center;
    font-size: 11px;
    padding: 20px;
    border-top: 1px solid #006666;
    color: #000;
    font-size: 8pt;}

  2. #2
    Carpe Diem = Fish of the Day fisherboy's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you mean you want your whole page to center within the browser window?

    If so
    #px1_frame {
    border: 0px solid #333;
    margin: 0 auto;
    width:745px;
    font-family : Arial, Helvetica, Verdana;}

    Otherwise text-align: center; for each affected div or for #px1_frame.

    Can you post the html as well?
    fisherboy
    Web Site Design


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •