Results 1 to 5 of 5

Thread: AnyLink Vertical Menu text overlap issue

  1. #1
    Join Date
    Dec 2006
    Location
    Ottawa, Ontario
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default AnyLink Vertical Menu text overlap issue

    1) Script Title: AnyLink Vertical Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nkvertical.htm

    3) Describe problem: I'm using an unordered list for the main links. When the default font size is increased in the browser in IE7 and Firefox, some of the text wraps beyond the height of the <li>, causing overlapping text. Any suggestions?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Express the dimensions of the container in em's rather than px's. An em is roughly equivalent to the size of a character so will shrink and grow with text size changes. With a default font like times at its default size, it is also roughly equivalent to 16px. Fractional amounts of em's are allowed:

    HTML Code:
    <div style="width:10.725em;">Some text</div>
    If the dimensions you need to influence are set by the script, the script most likely would need to be modified to accommodate em's in place of px's but, perhaps not, only way to know is to try.

    Also, in many cases, not specifying a width or specifying a larger value than could possibly be required, will create the conditions required to allow text to appear all on one line.

    If following either of these strategies, it is important that there be no containing element with smaller dimensions around the element who's dimensions you are setting. The outer container will almost always set the dimensions for the inner element.

    To be of more help, I would need a link to your page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2006
    Location
    Ottawa, Ontario
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The problem, jscheuer1, is that there isn't enough room in the fixed-width template for the text to stay on one line in a larger font. Here is the page I'm working on: http://www.entrust.com/index.cfm

    Thanks for your help on this.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You're right. It is a problem due to your use of a fixed width template. Anything that doesn't fit and that has no way to wrap is getting squished. This has nothing much to do with the menu. If you want to use ul and li tags here, you need to find another template or modify this one to use relative widths, such as ems.

    Or, if you don't mind the text wrapping, you could scrap the ul's and use div's in place of the li's.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Dec 2006
    Location
    Ottawa, Ontario
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    div's, eh? I'll give that a shot. Thanks!

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
  •