Help - Search - Members - Calendar
Full Version: Mtblogdescription With A Banner Image
Movable Type Community Forum > Additional Resources > Tips and Tricks
Spontz
Is there a way to convince the MTBlogDescription text to sit at the very bottom of the banner area if I'm using a banner image, and not the plain text title? I've tried everything I can think of with line-height and vertical-align and so forth, with no luck at all.
Su-
In what? Other than some vague general concepts(which are probably of limited use if you haven't figured it out yourself), this is hard to answer without seeing the actual layout/code involved.

If you can't show for whatever reason, then familiarize yourself with what can be done by setting a container to position:relative, and then things inside it to position:absolute.

Vertical-align is intended for images, so give that up. And line-height will position the text in the middle of the value you give(it defines space both above and below), so that's pretty futile, too.
Spontz
Ah, sorry, I thought maybe there was some astonishingly simple way of doing this of which I was unaware. smile.gif

What I have is this in the index template:

QUOTE
<div id="banner">
<div id="banner-inner" class="pkg">
<h2 id="banner-description"><$MTBlogDescription$></h2>
</div>
</div>


And this in the stylesheet:

QUOTE
#banner {
background-image: url(../images/banner.jpg);
background-repeat: no-repeat;
position: relative;
width: 100%;
height: 80px;
}

#banner-inner {
position: static;
border-width: 0;
}

#banner-header {
display: none;
}

#banner-description {
font-family: "Times New Roman", Times, serif;
font-size: medium;
font-weight: bold;
background: none;
margin: 0;
padding: 0;
}


I'd just like to get the description to sit at the bottom of the banner. I could add padding to the top, but that feels like fixing the problem with duct tape. I'm sure it wouldn't work properly on every browser.
bruce21
Either change the code for description to below the banner div or use padding.
QUOTE
I could add padding to the top, but that feels like fixing the problem with duct tape.


Padding is a valid CSS technique. Or as Su said, use position absolute if wanted...and seeing it helps immensely, but padding-top:65px or whatever is fine
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.