Span Width w/ BG Image...

liunx

Guest
<!-- m --><a class="postlink" href="http://www.sureo.com/tcg/template.php">http://www.sureo.com/tcg/template.php</a><!-- m -->

the style sheet is here:

<!-- m --><a class="postlink" href="http://www.sureo.com/tcg/template.css">http://www.sureo.com/tcg/template.css</a><!-- m -->

~first off, on the initial load, how come the header image is loading late and last?

~2nd of all, I am having problems with getting the menu header bg image or span to cover the full length of the parent div...
i think you can see from the site what i mean!

~next, how do i center that text vertically over that footer div/image?nodaa90,

First, header image - probably because it's the biggest image on the page. Text loads quickly, images take time, the bigger the longer. Anyhow, for me (hi-speed connection) it loaded at the same time as the rest of the page anyway - no problems.

Second, with regard to your header bg image (assuming you mean the background behind "menu header"), here's what you put in your code:

CSS:
.menu_h
{
background-repeat:repeat;
text-align:center;

border:1px solid #DEE3E7;
background-image:url(./images/hdmenu.png);
}

HTML:
<span class="menu_h">
menu header
</span>

That span tells me (and CSS) that you want a span behind the text "menu header" with a certain background - not that you want a child division filling a certain area of a parent division, regardless of what text you put on top of it. If you change your text to "the menu header goes here", the background (as it is now) will just expand to fill in the area behind the text b/c that's all you've told it to do, so far...well than, heh, im not sure how im supposed to do it right.. is using span the right way to go...im not sure how to get around this easily...

i understand what i did wrong tho...

*I belive i tried specifying width of that class, with percents AND aboslute px...i remember it still not working :(Span by default is an in-line element, therefore width does not apply to it. Besides, semantically it would make more sense to use paragraphs, or an unordered list (and thus LI tags) for the navigation items, not SPAN and BR tags. Then you would apply your class to the P or LI tag, whichever route you take.NogDog just beat me to it - and he's exactly right. If you want to control width/height attributes, you need a block-level element.
 
Back
Top