Support » Themes and Templates » Trouble positioning link – CSS

  • I’m trying to setup a top navigation area for my website with some simple links in the header, with my graphic as the background. I’m having some trouble and could use some guidance. If I’m going about this the wrong way, feel free to let me know, as I’m pretty new at this stuff.

    The relevant portion of my xhtml header:

    <h1 id=”header”>
    Page 1
    Page 2

    The CSS for the Header:

    #header {
    background:#ffffff; /*eeeeee*/
    background-image: url(“redlogo.gif”);
    color: #333333;
    border-bottom: solid 1px black;

    And the header links:

    #header a {
    font-family:verdana, arial, sans-serif;

    The full source can be seen here:…assic/style.css

    In the latest version of Firefox, this looks good, as far as where I want the line of links to

    be vertically. In IE 6 though, it puts it near the bottom of the graphic and then repeats the

    graphic again. If I change the line height to something smaller to make the header the right

    vertical size, the text is in the middle of the graphic in both browsers.

    Here are screenshots of what I’m seeing.

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • you can probably clean up the code as you have it now, a bit late for me to check everything but as simple rule:

    background-image: url(“redlogo.gif”); set this to

    background-image: url(“redlogo.gif”) no-repeat;

    that’ll stop it from repeating

    for navigation lists.

    Also it’s probably a good idea to wrap the header in another div, within that add the style or whatever for the header div, and then add another div for the menu. This should help ease with IE since you’re containing the two divs within another continer which should help when using borders etc.

Viewing 1 replies (of 1 total)
  • The topic ‘Trouble positioning link – CSS’ is closed to new replies.