• Resolved Mizuki

    (@mizuki)


    hi. I have a problem in divs.. the text is in the center vertically and horizontally. So if I use a large font, it won’t look nice. here’s a sample of the image

    How do I align the text?

    I use `<div class=blogtitle>
    <?php the_title(); ?></div>
    </div>

    then on the css:

    .blogtitle {
    background: transparent url(‘images/title.png’) left bottom no-repeat;
    color: #3F503F;
    line-height: 55px;
    width: 470px;
    text-align:center;
    letter-spacing: 2px;
    font-family: Century Gothic;
    font-weight: bold;
    text-transform:uppercase;
    font-size: 22px;
    }`

    what’s missing in the code?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Do you have an URL? Images are next to useless. If you can provide an URL I can use FireBug to fiddle with the CSS directly and not have to guess at the problem.

    How do you want the text to be aligned? (e.g. horizontally and vertically centered, left-aligned and vertically centered)

    Thread Starter Mizuki

    (@mizuki)

    the site is currently under maintenance. =D I can’t open it to the public coz I’m still fixing it. ^^~

    BUT I already solved the problem. I just guessed some codes. So uhm. I placed another seperate div class for the relative position only.

    .bottom
    {position:relative;
    bottom:-14px;
    }

    which made it:

    <div class=blogtitle>
    <div class=bottom>
    <?php the_title(); ?></div>
    </div>

    that fixed the problem for me. ?? It’s now positioned to the way I like. Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to align text lower on div class?’ is closed to new replies.