Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Text Over Image in Faded Box;
Old 03-20-2007, 05:43 PM Text Over Image in Faded Box;
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
Hi there, no sure if this is the right place to post...

About a year ago I read a tutorial ablout taking and image and placing a nearly transparant box over it that could hold text. Sort of like a glass screen infront of the background image.

I'm sure it was done in css but I could be wrong!

Any ideas or examples?

Cheers
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-20-2007, 06:47 PM Re: Text Over Image in Faded Box;
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
Ok, ive sussed that one out

But I'm being really crap here.... How do I centre the main background image??
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."

Last edited by rolda hayes; 03-20-2007 at 08:15 PM..
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 03-20-2007, 08:45 PM Re: Text Over Image in Faded Box;
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
background-position: center center;

http://www.w3schools.com/css/pr_background-position.asp
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-21-2007, 07:54 AM Re: Text Over Image in Faded Box;
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
Thanks Chris
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 03-21-2007, 03:45 PM Re: Text Over Image in Faded Box;
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
Hmmm, cant get this to work, what am I missing here?

http://www.kingsheadsyresham.co.uk/index2.html
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 03-21-2007, 04:42 PM Re: Text Over Image in Faded Box;
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
You're missing an attribute:
background:transparent url(images/main2.jpg) no-repeat scroll center;

should be
background:transparent url(images/main2.jpg) no-repeat scroll center center;

You're also missing your </body> tag.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 03-22-2007, 06:35 AM Re: Text Over Image in Faded Box;
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
But I've already got center center; ??

still cant get it to work
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 03-22-2007, 11:30 AM Re: Text Over Image in Faded Box;
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
but it can't be anywhere other than it is !

it's in a box that's the same size as the image is
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-22-2007, 12:54 PM Re: Text Over Image in Faded Box;
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
No I'm getting a bit lost here....

If I'd created the page with a table i could centre the image in the middle of the screen. Whats in a box the same size as the image?

this is what i want to achieve but with out the text on the background being an image

http://www.kingsheadsyresham.co.uk
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."

Last edited by rolda hayes; 03-22-2007 at 01:20 PM..
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 03-22-2007, 01:52 PM Re: Text Over Image in Faded Box;
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
This is a wood for trees moment

Your image is a background to #backtrans which is 855px W x 425px H and so is the image.
It's the background image that is affected by the center center properties NOT the container, so the image is trying to centre up in a container where it cannot move.

IF you want it to be centred overall it has to be the background image for the body.

IF you want it to be centred inside a controlled area then size the container larger than the image.

BTW You are missing a closing bracket "}" before .splashtext
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-23-2007, 06:44 AM Re: Text Over Image in Faded Box;
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
Bloody Hell!!! Wood!!! Everywhere!!!

Thanks Chris, all makes sense now. Oh how I miss tables...
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Text Over Image in Faded Box;
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.77138 seconds with 12 queries