Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] text-align: center; WORKS ON ONE BUT NOT THE OTHER

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #207329
    drotar
    Participant

    little help. am working on the website http://www.bjoinfilms.com/reel.html

    at the top of each video player (there are two) using the identical h2 class and CSS. However, the top “Recent Reel” is centered the way I want it. The “Archive Reel” text however is off center for some reason
    and I can’t figure out how to get it centered like Recent Reel

    any suggestions would be greatly appreciated.

    <h2 class=”h2BFReel”>Recent Reel</h2>
    <h2 class=”h2BFReel”>Archive Reel</h2>

    .h2BFReel {
    font-family: ‘NeuzeitSLTStdBookHeavy’;
    font-weight: 100;
    font-size: 1.6em;
    background-color: rgba(0,0,0,.4);
    color: white;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0,0,0,.5);
    text-align: center;
    padding-top: 7px;
    padding-bottom: 7px;
    letter-spacing:.2em;
    margin-bottom: 40px;
    }

    #207335
    mhodges44
    Participant

    Got it. Man that was a pain haha. Anyway, you have a div in there with a class of “rightRightRecent” that seems to have no content, but it has a width of 10%, which is pushing your “Archive Reel” h2 over. Remove the “width: 10%” from the .rightRightRecent class and you’re all good.

    #207337
    jurotek
    Participant

    The reason is off center because of rightRightRecent is not cleared
    ad clear:both to .h2BFReel;

    #207338
    mhodges44
    Participant

    jurotek’s answer is also valid, so long as you want to keep an empty content div with fixed width – really depends on what you’re trying to do.

    #207339
    jurotek
    Participant

    exactly, I agree with mhodges

    #207403
    drotar
    Participant

    THANK YOU EVERYBODY FOR YOUR BRILLIANT INSIGHT. sometimes one cannot see the forest through the trees. your continued help is always appreciated and embraced. thank you again.

    drotar

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.