Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Lining up the header

Lining up the header

Scheduled Pinned Locked Moved Web Development
htmlcssadobequestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aaron Howarth
    wrote on last edited by
    #1

    Afternoon guys, I'm having some trouble lining up this image, It was cropped down in photoshop and now i'm trying to add it as you can see in my code but if you preview it you will see it is slightly off and I have no idea why!?!? HTML

    <!doctype html>
    <head>
    <meta http-equiv="Content-Type" content="text/html"; charset=UTF-8" />
    <title>Awesome Website from CSS-tricks</title>
    <link rel="stylesheet" type="text/css" href="style.css" />
    </head>

    <body>

    <ul id="nav">
        <li></li>
    </ul>
    

    </body>
    </html>

    CSS

    * {
    margin: 0;
    padding: 0;
    }

    body {
    font-size: 62.5%;
    font-family: Helvetica, sans-serif;
    background: url(images/body-bg.png) repeat-x top #f5ecd4;
    }

    #nav {
    height: 336px;
    width: 800px;
    margin: 0 auto;
    background: url(images/header-bg.jpg) no-repeat;
    }

    wanted to attach image but not sure how!

    M R 3 Replies Last reply
    0
    • A Aaron Howarth

      Afternoon guys, I'm having some trouble lining up this image, It was cropped down in photoshop and now i'm trying to add it as you can see in my code but if you preview it you will see it is slightly off and I have no idea why!?!? HTML

      <!doctype html>
      <head>
      <meta http-equiv="Content-Type" content="text/html"; charset=UTF-8" />
      <title>Awesome Website from CSS-tricks</title>
      <link rel="stylesheet" type="text/css" href="style.css" />
      </head>

      <body>

      <ul id="nav">
          <li></li>
      </ul>
      

      </body>
      </html>

      CSS

      * {
      margin: 0;
      padding: 0;
      }

      body {
      font-size: 62.5%;
      font-family: Helvetica, sans-serif;
      background: url(images/body-bg.png) repeat-x top #f5ecd4;
      }

      #nav {
      height: 336px;
      width: 800px;
      margin: 0 auto;
      background: url(images/header-bg.jpg) no-repeat;
      }

      wanted to attach image but not sure how!

      M Offline
      M Offline
      Mohibur Rashid
      wrote on last edited by
      #2

      I didnt understand your question but your meta declaration is improper. you wrote

      Aaron Howarth wrote:

      <meta http-equiv="Content-Type" content="text/html"; charset=UTF-8" />

      it should be

      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

      Your slightly off does not make sense and another thing is improper image repeating may not workout.

      1 Reply Last reply
      0
      • A Aaron Howarth

        Afternoon guys, I'm having some trouble lining up this image, It was cropped down in photoshop and now i'm trying to add it as you can see in my code but if you preview it you will see it is slightly off and I have no idea why!?!? HTML

        <!doctype html>
        <head>
        <meta http-equiv="Content-Type" content="text/html"; charset=UTF-8" />
        <title>Awesome Website from CSS-tricks</title>
        <link rel="stylesheet" type="text/css" href="style.css" />
        </head>

        <body>

        <ul id="nav">
            <li></li>
        </ul>
        

        </body>
        </html>

        CSS

        * {
        margin: 0;
        padding: 0;
        }

        body {
        font-size: 62.5%;
        font-family: Helvetica, sans-serif;
        background: url(images/body-bg.png) repeat-x top #f5ecd4;
        }

        #nav {
        height: 336px;
        width: 800px;
        margin: 0 auto;
        background: url(images/header-bg.jpg) no-repeat;
        }

        wanted to attach image but not sure how!

        R Offline
        R Offline
        Rojan Gh
        wrote on last edited by
        #3

        Mention you images dimensions please.

        Sojaner!

        1 Reply Last reply
        0
        • A Aaron Howarth

          Afternoon guys, I'm having some trouble lining up this image, It was cropped down in photoshop and now i'm trying to add it as you can see in my code but if you preview it you will see it is slightly off and I have no idea why!?!? HTML

          <!doctype html>
          <head>
          <meta http-equiv="Content-Type" content="text/html"; charset=UTF-8" />
          <title>Awesome Website from CSS-tricks</title>
          <link rel="stylesheet" type="text/css" href="style.css" />
          </head>

          <body>

          <ul id="nav">
              <li></li>
          </ul>
          

          </body>
          </html>

          CSS

          * {
          margin: 0;
          padding: 0;
          }

          body {
          font-size: 62.5%;
          font-family: Helvetica, sans-serif;
          background: url(images/body-bg.png) repeat-x top #f5ecd4;
          }

          #nav {
          height: 336px;
          width: 800px;
          margin: 0 auto;
          background: url(images/header-bg.jpg) no-repeat;
          }

          wanted to attach image but not sure how!

          R Offline
          R Offline
          Rojan Gh
          wrote on last edited by
          #4

          I think I know your problem, you need to deal with the

          lu

          and

          li

          tags in the css. Try this:

          ul {
          list-style-type: none;
          }

          in your css and you will notice the difference. This may be useful to you: CSS UL LI - Horizontal CSS Menu Hope this will help you.

          Sojaner!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups