SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    need help centering header for all screens

    hi, im a newbie trying to get my header to stay in the center on all pages. so far on most screens it wants to hug the left. any help is appreciated. heres the link: http://www.blenderairshows.com/photo.html

    thanks

  2. #2
    Non-Member
    Join Date
    Jan 2012
    Location
    ForumHookers.com
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you got this fixed?

  3. #3
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no not yet

  4. #4
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,813
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    The problem is that the content of .header (.logo) has fixed position, this cause .header to collapse... essentially becoming invisible.. and since the content are fixed they too aren't centered.

    There are other minor issues,for what you have now.. you could fix it this way:


    Code:
    <div class="header"><a href="index.html"><img src="images/logo.png" alt="Blender Airshows"/></a><!-- end .header --></div>

    in the CSS
    get rid of .logo{...}
    and replace .header with :

    Code:
     .header {
    	background: url(images/logograd.gif)  repeat-x #000; height:153px; 	text-align: center; position: fixed;  top:0; left:0; right:0; width: 100%; z-index: 999;
    
    }
    you will need these OPTIMIZED images.
    logo.pnglogograd.gif

    sorry that the attachments will take a bit to clear in the forum.. but I hope this will help.

  5. #5
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the help, i will give that a try.

  6. #6
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That worked. thanks a bunch!


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
  •