I am designing my first theme for drupal 6.x based on beginingW2. I think I've done great so far I just can't seem to place an image at the bottom of my blocks to complete them. I've been looking over all the themes I have so far that do this comparing page.tpl and layout.css for examples they do seem to vary.. and I just don't seem to be able to get it.
my code from the block.tpl.php (updated)
<div class="block block-<?php print $block->module; ?>" id="block-<?php print $block->module; ?>-<?php print $block->delta; ?>">
<h2 class="title">
<?php print $block->subject; ?>
</h2>
<div class="blockcontent"><?php print $block->content; ?></div>
<div class="end-block"></div>
</div>
I am using the following in layout.css to make the image available. (updated)
.end-block {
background: url(images/block-bottom.png);
}
Here is a screenshot of my theme.
http://i305.photobucket.com/albums/nn219/stevenbinion/web%20design/jedio...
Here is the image I need placed at the end of the block.
http://i305.photobucket.com/albums/nn219/stevenbinion/web%20design/block...
Comments
I am guessing you want the
I am guessing you want the image at the bottom of each block.
If so it will depend on the html in your themes block.tpl.php file. You will need an element (probably a div) with a css class name that will allow you to associate the image with the element.
did you look at my code?
Did you even look at the code snipets I posted? I'm guessing not because everything you just said is in those snipets.
=-=
did you even take the time to realize that nevets, said block.tpl.php and you are posting snippets from page.tpl.php?
I'll give that a try.
Thank you for pointing out he said block.tpl.php and not page.tpl.php cause yes, I did miss that.
I tried it
I gave it a shot in the block.tpl.php this time and it changed nothing. I updated my post and its everything from the block.tpl.php
#end-block (an id reference)
#end-block(an id reference) should be.end-block(a class reference)Thank you.
I have tried that too. but thanks for pointing out the difference of # and . I knew both were used, didn't know more then that however.
It was currently on #end-block though, so I changed it to .end-block and leaving it that way. Just have to figure out why it's still not showing up.
Without a link at this point
Without a link at this point I can only recommend you try the Firefox extension firebug and use the inspect feature to make sure the html is what you expect for a block and the css is being applied. You will also be able to determine if the image is being found.
You can also clear your browser cache to make sure the latest css is being used.
Thanks again nevets, I'll
Thanks again nevets, I'll give the plugin a try as the theme is currently on local testing only, it's not on a live site. I'll get back to you once I have some results, or just put it on a live site so I can link it.
Firebug results
I installed the firebug plugins and have the results now.
http://i305.photobucket.com/albums/nn219/stevenbinion/web%20design/jedio...
I thought this pic would avoid any errors on my part.
Duh!!! height:
Seeing the results from firebug, and that the code sees the image, I thought over why would a webpage not display an image it sees, so I added height to .end-block and I see it... it's out of wack right now but I have something to work with.
The next time you hear about this theme, it will be when I plug my drupal site. Thanks for being patient.