Thread: CSS positioning

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    Cary, NC
    Posts
    27
    Rep Power
    0

    CSS positioning


    I am using CSS to create a navigation bar but I can't get it to position properly. I use position: absolute and top:200px I want the nav bar to move down so I can insert a row of 3 images. I have attached my stylesheet(jantest.css) and my main sheet(index.htm) Also I tried to use display:block so I wouldn't have to put a <p> tag inbetween each link but it doesn't work.
    I used text-decoration:none but my links show up underlined.

    My H2 tag views ok but when I print it the background is white instead of blue and text is grayy instead of white.

    I am just learning web design and CSS. This is my first web site and I need some help.
    Thanks for any help.
    Attached Files
  2. #2
  3. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1100
    Zip file is emtpy when I try to download it. If the code is not exceptionally long, you can just post it and we'll work with it from here.
  4. #3
  5. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    remove det dot between div.nav and the a elements. and it should work

    like this:

    div.nav a {display:block;margin: 0; }
    div.nav a:link{ display:block; text-decoration: none; color: #0066FF;}
    div.nav a:visited{display:block; text-decoration: none; color: purple;}
    div.nav a:hover{display:block; text-decoration: none; color: red;}

    and you have a typo in the
    div.nav position: absolute;
    Last edited by Akh; March 30th, 2003 at 07:25 PM.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    Cary, NC
    Posts
    27
    Rep Power
    0
    Thanks,
    that did fix hover. Do you know how to fix the position of the navigation. I want to move it down so
    I can insert images.
  8. #5
  9. No Profile Picture
    wibble
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Location
    UK
    Posts
    161
    Rep Power
    14
    like Akh said you have a spelling error in the following line:
    Code:
    position: absolute;
    in your div element in the css file. Correct this and you will see that your positioning works.

IMN logo majestic logo threadwatch logo seochat tools logo