moving a div slightly to the right/middle

Discussion in 'HTML & Website Design' started by absolutejw, Jun 21, 2007.

  1. #1
    Hi,

    I am new to css but managed to build a home page..please visit the link below to preview:

    http://www.absolute-studios.com/after/testing.html

    On the left side I have a menu where I would like a black background behind and move the menu tabs some to the middle.

    Please visit the link below to see the actual layout to see how it should look like:

    http://www.absolute-studios.com/after/layout.jpg

    Suggestions/tips are greatly appreciated.

    Thanks,
     
    absolutejw, Jun 21, 2007 IP
  2. x-noise

    x-noise Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    for the menu you can use :hover pseudo-class.

    http://www.w3.org/TR/REC-CSS2/selector.html#dynamic-pseudo-classes

    set the normal anchor text with left align, and on hover make it center.

    for the background, you can use css rolover images (meaining 2 differend background images: one for normal anchor -> initial one, and one on hover)

    the code might look like this:

    a { text-align:left; text-decoration:none; background:url(img1) }

    a:hover { text-align:center; background:url(img2); }
     
    x-noise, Jun 21, 2007 IP