Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. Share your own thoughts and experience, accounts may be terminated for violations.
  • Welcome to AcornDomains.co.uk, a friendly community for UK domain investors, developers and anyone interested in domain names.

    Whether you're looking to buy or sell domains, learn more about the UK domain market, get feedback on your names, or simply chat with other domainers, you're in the right place. AcornDomains has been bringing together people from across the UK domain industry for many years, from complete beginners to experienced investors.

    Have a look around, join the discussions and, if you haven't already, create a free account and introduce yourself.

caption box question

Status
Not open for further replies.
Joined
Jun 29, 2009
Posts
126
Reaction score
2
Hi Guys,
I've added a translucent? caption box to an image on my website
but I can't get it to appear at the bottom of the image, it keeps
floating to the top no matter what padding/margins I use.
The code I'm using is:

CSS

div.background{width:560px;height:112px;background:url(feeld2.jpg) repeat;}
div.transbox{width:560px;height:20px;background:#000;opacity:0.5;filter:alpha(opacity=50);}
div.transbox p{padding:1px 10px;color:#fff;}

HTML

<div class="background">
<div class="transbox">
<p>This is some text that is placed in the transparent box.</p>
</div>
</div>

ta in advance for any help,
cheers,
Mark
 
You could try adding top: 82px to the div.transbox or whatever pixels you require depending on how far you want it down.

On my phone so can't check it but hopefully should work.
 
What happens if you try this?

Code:
div.background{width:560px;height:20px; padding-top:92px; background :url(feeld2.jpg) repeat;}
div.transbox{width:560px;height:20px;background:#0 00;opacity:0.5;filter:alpha(opacity=50);}
div.transbox p{padding:1px 10px;color:#fff;}

You know what happens-it works perfectly!
Thanks for the quick reply guys, problem solved.
Tricky, you usually do it for me but I couldn't get it to work on this
occasion (didn't know when you said top:82px whether or not you
meant padding-top or margin-top) but knowing the codemaster you
are I've probably done it wrong!
Cheers,
Mark.
 
Status
Not open for further replies.
Top Bottom