Need some coding help

Discussion in 'CSS' started by Trojanfan, Jun 8, 2008.

  1. #1
    Trojanfan, Jun 8, 2008 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    First issue:
    #sidebar li li a, a:visited { /*style.css (line 392)*/
    color:#CE0101;
    font-family:Tahoma,sans-serif;
    font-size:13px;
    font-weight:bold;
    height:auto;
    [color=red]line-height:1px;[/color]
    padding-left:10px;
    text-decoration:none;
    width:96%;
    }
    Code (markup):
    Each new line's baseline is only 1px below the previous.

    Second issue: Couldn't replicate. Is it browser dependent?

    cheers,

    gary
     
    kk5st, Jun 8, 2008 IP
  3. Trojanfan

    Trojanfan Active Member

    Messages:
    352
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #3
    I managed to finally fix the read full article thing myself shortly after posting. I checked the site in IE and the other problem didn't show up, so it was only firefox where the problem with text overlapping was occurring. I have since tweaked some more stuff and its working...for now...which is good...I'll come back if it goes down again...

    in the meantime, any idea why the text is staggered under "recent posts"? for longer titles, the second line juts out farther left than it should
     
    Trojanfan, Jun 9, 2008 IP
  4. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #4
    No, it's not working in Firefox. The bad line-height value is still there. It was ok in IE because of an IE bug.

    You have left padding on <a>, which is an inline element. The padding does not apply to the block of text, but to the line.

    You are not taking advantage of the cascade. Instead, you're micro-managing, with each little tweak requiring a tweak somewhere else.

    cheers,

    gary
     
    kk5st, Jun 9, 2008 IP
  5. Trojanfan

    Trojanfan Active Member

    Messages:
    352
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #5
    Gary,

    I have had to do it that way because the template itself has terrible coding. I had to basically redo the coding since if I would change something in say the content, it would also affect the sidebar even though they aren't told to use the same style. It makes no sense, but that's what was happening. So I have HAD to micromanage. I have no choice.

    The text still overwrites on itself in your browser? What version of firefox are you using?
     
    Trojanfan, Jun 9, 2008 IP
  6. Trojanfan

    Trojanfan Active Member

    Messages:
    352
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #6
    New major issue: Try clicking all of the links under a section on the sidebar. For some reason, when a link becomes visited, it takes on some of the properties of the menu links even though they are not assigned the same style formats. And I addressed the sidebar links a:visited directly in the css, still nothing. It completely screws up the sidebar when you click the links.
     
    Trojanfan, Jun 9, 2008 IP
  7. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #7
    I see that you've removed the offending line-height. It does not matter which version, if the style rule is being followed correctly&#8212;which it was. But, fyi, it's 2.0.0.14.

    If you're going to float the anchor, you need to make its parent li {overflow: hidden;}. See how to contain float elements.

    If you haven't already, install the firebug extension to Firefox. You'll be able to view the actual cascade, as applied to any given element.

    Do not use IE to evaluate your code. Use a modern browser, eg. Firefox, Opera and Konqueror/Safari, for that. You can then tweak to deal with IE's buggy behavior.

    cheers,

    gary
     
    kk5st, Jun 9, 2008 IP
  8. Trojanfan

    Trojanfan Active Member

    Messages:
    352
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #8
    kk5st, I do not use IE. I only crosscheck web sites with IE. I use firefox 3.0.

    Do you have any ideas as to the problem I mentioned with the sidebar taking over styles from the menu for no apparent reason?
     
    Trojanfan, Jun 9, 2008 IP
  9. Trojanfan

    Trojanfan Active Member

    Messages:
    352
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #9
    the overflow:hidden has helped to keep the items from mashing into each other, which is good. However, the links being different and moving after being clicked is still an issue. In particular, "recent posts" changes a lot, for no apparent reason. The text doesn't have the same default attributes as the others in the sidebar and I'm not sure why
     
    Trojanfan, Jun 9, 2008 IP
  10. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #10
    I'm not familiar enough with the site to tell what it is you mean. Use Firebug, and view the cascade. You'll see all the rulesets that are applied to the element. You'll even see which rules have been overridden, and no longer apply.

    In Firebug, you can edit the style rules and see the changes on the fly.

    cheers,

    gary
     
    kk5st, Jun 9, 2008 IP
  11. Trojanfan

    Trojanfan Active Member

    Messages:
    352
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #11
    gary, thanks for the recommendation. I'll try that out next time.

    I fixed the problem. The other <li> tags were automatically being assigned classes, apparently the recent posts one was not. I manually added the class and it worked
     
    Trojanfan, Jun 9, 2008 IP
  12. Trojanfan

    Trojanfan Active Member

    Messages:
    352
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #12
    Thanks everyone. All problems fixed for now...if you have any recommendations you could feel free to run them by me
     
    Trojanfan, Jun 10, 2008 IP