dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: CSS/Header Question

  1. #1
    Join Date
    Aug 2011
    Location
    Saginaw Mi
    Posts
    22

    Question CSS/Header Question

    I am wanting to place an Empty Header with a background-color: #FFF; at the Top of my index.php.

    Example :
    <!-- XHTML -->
    <div id=" header"></div>

    /* CSS Rules */

    #header {
    background-color: #FFF;
    width: 800px;
    height: 150px;
    margin: 0 auto; <!-- Position to Top and Center -->
    padding: 0px;
    }

    I do not want it nested inside a <div id="wrapper"></div> . The <div id="nav"></div> will not be nested inside the header, it will be under it. And the Nav to will not be within a wrapper div.

    I guess what I am asking is, is my code right? And must I nest all my Mark Up within a Wrapper Div?

    Please forgive me for un proper HTML and CSS syntax. I am here to learn.

    Thank you

  2. #2
    Join Date
    Feb 2008
    Location
    Amsterdam, The Netherlands
    Posts
    273
    I guess what I am asking is, is my code right? And must I nest all my Mark Up within a Wrapper Div?
    Your code is alright. And you should wrap all the divs in one big wrapper (e.g. #grandContainer) that you can center and give a fixed with. Unless you want to use the whole width of the window, but since 1024 is making a comeback, a fixed width of 960 to 980 px is generally best.

  3. #3
    Join Date
    Aug 2011
    Location
    Saginaw Mi
    Posts
    22
    Quote Originally Posted by Frank62 View Post
    Your code is alright. And you should wrap all the divs in one big wrapper (e.g. #grandContainer) that you can center and give a fixed with. Unless you want to use the whole width of the window, but since 1024 is making a comeback, a fixed width of 960 to 980 px is generally best.
    Thank you so much for your advice. It was very helpful.....


    Thank you Frank.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles