1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Quick help?

Discussion in 'Web Design' started by Ampix0, Jan 10, 2012.

  1. Ampix0

    Ampix0 Power Member

    Joined:
    Jan 10, 2012
    Messages:
    525
    Likes Received:
    60
    Home Page:
    Hey guys. Some old lady is paying me some pocket change to set up a wordpress for her. I had to do a decent amount of custom work to the theme, and I now just can not get the logo centered at all and I can't figure out why.

    Was wondering if anyone would be willing to pop open firebug or w/e you use and take a look and see if you have any ideas for me?

    I'd paste the link here but I'm sure it isn't allowed. if you post here i'll pm it to you.

    thanks in advance for the help, this is driving me nuts, no idea what is wrong.

    braillethis is the domain with a c-o-m ending (trying to evade filter here)
     
    Last edited: Jan 10, 2012
  2. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,148
    I 'll let it slide - post it like mysite dot com
     
  3. Ampix0

    Ampix0 Power Member

    Joined:
    Jan 10, 2012
    Messages:
    525
    Likes Received:
    60
    Home Page:
    Thanks man, I had to jump through a hoop to post it lol
     
  4. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,148
    Add this to your css file

    Code:
    #logo img {
        display:block !important;
        margin: 0 auto !important;
    }
    
     
    • Thanks Thanks x 2
  5. Ampix0

    Ampix0 Power Member

    Joined:
    Jan 10, 2012
    Messages:
    525
    Likes Received:
    60
    Home Page:
    Absolutely fantastic! thank you so much. I have never seen the important property before! What does it do? override inherited properties?
     
  6. Zapdos

    Zapdos Power Member

    Joined:
    Oct 22, 2011
    Messages:
    597
    Likes Received:
    708
    Location:
    Eastern North Carolina
    !important overrides everything. You could have a selection statement that is 'worth' 10k points, or even directly used on the element and it would still work.

    Code:
    a { color: red !important; }
    a { color: yellow }
    <div style="color: yellow;">
      <a style="color: yellow;"><font color="yellow">Still red</font></a>
    </div>
    
    Red would still be the font color. I generally consider !important a heavy handed or lazy approach to doing stuff. However it really depends on the code, sometimes !important is the only way to accomplish something.
     
    • Thanks Thanks x 1
  7. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,148
    As Zapdos said, !important overrides everything. There is an everlasting debate about its use (some people think it should not exist at all). Personally I tend to avoid it but there have been times where was the best solution (especially when you are trying to fix legacy third party spaghetti code).

    The reason I added it on your snippet is this:

    If you did not copy paste it to the end on the css file that loads last, there was a chance that it could get overridden by a conflicting property. This way though, it will work no matter where you copy paste it.
     
  8. Ampix0

    Ampix0 Power Member

    Joined:
    Jan 10, 2012
    Messages:
    525
    Likes Received:
    60
    Home Page:
    I feel like this would have been the only way in this situation. I shouldn't have been inheriting any properties (from what I saw) in that DIV. So this was a fantastic fix. :)
     
  9. endgeek

    endgeek Regular Member

    Joined:
    Jan 7, 2012
    Messages:
    245
    Likes Received:
    117
    Occupation:
    Web- & Graphicdesign
    Location:
    Germany
    ... I'm the only one? :D
     
  10. Ampix0

    Ampix0 Power Member

    Joined:
    Jan 10, 2012
    Messages:
    525
    Likes Received:
    60
    Home Page:
    You sick SOB.. XD