SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: <li> text

  1. #1
    SitePoint Member
    Join Date
    Aug 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    <li> text

    How do I center text within an LI tag?

    My specific problem is that I have backgrounds applied to both the LI and anchor in my top nav bar, but in IE (of course) the LI is bigger than the anchor, and the backgrounds don't line up.

    The backgrounds consist of a bottom and top pointer; if there is a different way to place these pointers to highlight the current page, I'm open to other options.

    I don't think people outside of the university network can access this, but just in case, here is the link:

    http://wwdev.housing.wisc.edu/Studen...TAS/index.html

    The borders are there to show the sizes of the LI and anchors.

    Thanks!

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Before any suggestions are made, you need to amend your doctype (drop back to XHTML 1.0) and lose the XML prologue:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    as it'll put IE into quirks (broken box model) mode.


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
  •