SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist Sikwondo's Avatar
    Join Date
    Sep 2005
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Menu Styling: Can you help?

    Hi Peeps,

    I am trying to set some navigation up a certain way using CSS and am a bit stuck.

    The current look is here:

    http://www.simonbailey.co.uk/trial/trial.html

    As you can see, I am after the nav text to have a block above it, and to change colour on hover (which it is doing).

    However, the effect I wanted to achieve was for the block above the text to line up flush with the text (it is currently a few pixels to the left) and for the block to be a little higher then it is to add some more space between the text and the block. I have tried messing about with padding, but am stuck

    Thought I would come ask the experts.

    Can anyone please help me with this? Any advice would be greatly appreciated.

    Thank you

    Simon

  2. #2
    SitePoint Guru
    Join Date
    Jun 2004
    Location
    Finland
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have whitespace before the text.

    Code:
    <a href="#">
    NEW SECTION</a>
    Get rid of it and it should be fine.

    As for the second issue, just give <a> a little padding-top.

  3. #3
    SitePoint Wizard bronze trophy DaveWoods's Avatar
    Join Date
    Dec 2004
    Location
    Derbyshire - UK
    Posts
    2,651
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also you need Doctype

  4. #4
    SitePoint Evangelist Sikwondo's Avatar
    Join Date
    Sep 2005
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you guys All solved

    Reason there was no Doctype was I mocked that up in a text editor just to use as an example.

  5. #5
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    ah, but leaving out a doctype can affect these things, you have to be careful :P

  6. #6
    SitePoint Evangelist Sikwondo's Avatar
    Join Date
    Sep 2005
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stormrider
    ah, but leaving out a doctype can affect these things, you have to be careful :P
    I wasn't aware of that... thank you


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
  •