SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    P class properties being overided

    I have an instance where some p class properties are being overided by the main p class properties.

    In the main p class properties, I have Arial 11px text with the text being justified.

    In the alt p class I have Verdana 10px text with the text being left aligned. The problem is the text does not inherit the properties of the alt class. I haven't had this problem with CSS before. I have used multiple p classes on other sites, but haven't had this problem. Maybe I am missing something.

    http://www.widescreenadvocate.org

    See the text in the sidebar, that is justified? That's the text that I want changed.

    To take a look at my stylesheet, look http://www.widescreenadvocate/styles.css

    Thanks for the help!
    Last edited by Joshua Clinard; Jun 12, 2003 at 13:17.

  2. #2
    Super Ninja Monkey Travis's Avatar
    Join Date
    Dec 2001
    Location
    Sioux City, Iowa
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On p.left, you need to set text-align: left to reset the text align to its original setting. Otherwise, it will inherit the setting from its parent class.
    Travis Watkins - Hyperactive Coder
    My Blog: Realist Anew
    Projects: Alacarte - Gnome Menu Editor

  3. #3
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I forgot to mention that I also need to change the margin to something smaller than 20px for that area. I tried using margin-left: 10px; to no avail.

  4. #4
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does anyone know how to do this?

  5. #5
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Has anyone even taken a look at the margins I am referring to? I would really like to get this taken care of, if at all possible. If you take a look at it, but can't figure out how to fix it, at least let me know that you attempted to help. There is no shame in not knowing how to do something you know. It just seems like there is little sense of community here when things like this happen. Some people may find other places to get help if enough people notice. I am not just talking about my thread, I have seen it elsewhere, even if it's not that often. I always try to help when I can, and if I don't know something, I try to make an educated guess, so they might be able to experiment with something that they hadn't tried before. I have stumbled upon several answers in this way myself. This is a great community, but together, we can make it even better!

  6. #6
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Getting a 404 on your site.

  7. #7
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For some reason, when I edited the URl to point to the new page, it didn't work.

    http://www.widescreenadvocate.org

  8. #8
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone willing to take a second look at this? Please! I'd really like to get this looking right!

  9. #9
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,343
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi Joshua,

    Can you explain exactly what we're looking for. Is it the text in your #mainright sidebar or is it the text in your left #navbar.

    Neither of which look justified to me in IE6 or am I looking in the wrong place.

    Paul

  10. #10
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I appreciate you taking a look. Let me explain the problem again. I was able to fix the text justification problem as per the instructions posted above. What I need to fix is the margin. There is a 20px margin, and I would like to change it to 5 or 10 px, so that the text is closer to the eges of the div borders. Yes, it is the #mainright div I am referring to.

  11. #11
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,343
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi Joshua,

    The problem is that the float is taking on the <p> property from the content id. You need to move the p definition further down your stylesheet until it is after the content definition.

    i.e.
    Code:
    #content p { margin: 20px 20px 0 25px; }
    #mainright p { margin: 5px 0 0 5px;}
    Now your left margin will be 5px.

    Hope this helps.

    Paul

  12. #12
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! That did indeed fix it!


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
  •