15 replies [Last post]
prismspecs
prismspecs's picture
Offline
Regular
Last seen: 10 years 44 weeks ago
Timezone: GMT-4
Joined: 2010-10-31
Posts: 18
Points: 23

Hey all,
So i'm well aware that you can place text over an image in a few ways, the problem is that i'm using a highly customized script for my navigation menu and cannot have the image as a background, and also cannot simply place the text over the image using the absolute/relative trick as the image's position is dynamic.
what I have now is essentially the image followed by a span which contains it's menu name, eg, "Videos." The span appears when the mouse is over the image. The problem is that since the span is positioned below the img, it "pops up" the image to accommodate the text. I also cannot simply put the span on top of the image and position it down, due to the navigation script.
Is there any way to make it so a span will not bump the image? I've tried messing with the z-index and that doesn't seem to do anything for me. Any suggestions would be greatly appreciated!
best,
me

lukewakeford
lukewakeford's picture
Offline
Enthusiast
UK, West Sussex, Dorset
Last seen: 2 years 30 weeks ago
UK, West Sussex, Dorset
Joined: 2010-07-24
Posts: 71
Points: 84

have you tried using

have you tried using position:fixed; ?

prismspecs
prismspecs's picture
Offline
Regular
Last seen: 10 years 44 weeks ago
Timezone: GMT-4
Joined: 2010-10-31
Posts: 18
Points: 23

yeah, it doesn't work for me

yeah, it doesn't work for me as it makes the text move around in a funny way with my navigation menu.

check it out:
http://graysonearle.com/test2/

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 16 weeks 2 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

My car sometimes stalls. Its

My car sometimes stalls. Its ten years old. Its also green and costs fifty pounds to fill up. How do I fix it?

Verschwindende wrote:
  • CSS doesn't make pies

prismspecs
prismspecs's picture
Offline
Regular
Last seen: 10 years 44 weeks ago
Timezone: GMT-4
Joined: 2010-10-31
Posts: 18
Points: 23

Um, thanks

Um, thanks

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 16 weeks 2 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

My point is, you've given us

My point is, you've given us nothing to look at. Without sight of how your code is marked up, we can't offer any real help.

Verschwindende wrote:
  • CSS doesn't make pies

prismspecs
prismspecs's picture
Offline
Regular
Last seen: 10 years 44 weeks ago
Timezone: GMT-4
Joined: 2010-10-31
Posts: 18
Points: 23

once

once again,

www.graysonearle.com/test2

edit: I only have it enabled on the first 4 menu items so ignore the others.

lukewakeford
lukewakeford's picture
Offline
Enthusiast
UK, West Sussex, Dorset
Last seen: 2 years 30 weeks ago
UK, West Sussex, Dorset
Joined: 2010-07-24
Posts: 71
Points: 84

And you definitely want the

And you definitely want the text to be text not part of the image? you can use alt="" and title="" u know..

z-indexes can be really awkward but might be your best bet.. if you have tried it with a z-index previously, try again but give the item you want to appear on top a really high z-index like 2000 and the bottom a z-index of 1..

Luke.

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 16 weeks 2 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

prismspecs wrote: once

prismspecs wrote:

once again,

www.graysonearle.com/test2

edit: I only have it enabled on the first 4 menu items so ignore the others.

Apologies, I was looking on my phone, seem to have missed the first link you gave us Smile

Verschwindende wrote:
  • CSS doesn't make pies

prismspecs
prismspecs's picture
Offline
Regular
Last seen: 10 years 44 weeks ago
Timezone: GMT-4
Joined: 2010-10-31
Posts: 18
Points: 23

Bah, that was a good idea but

Bah, that was a good idea but still no go. Sad
There has to be a way!
If I use alt or title, that will pop up the yellow box with a caption, right? I want something a bit prettier.
There just has to be a way!

prismspecs
prismspecs's picture
Offline
Regular
Last seen: 10 years 44 weeks ago
Timezone: GMT-4
Joined: 2010-10-31
Posts: 18
Points: 23

Bah, that was a good idea but

Bah, that was a good idea but still no go. Sad
There has to be a way!
If I use alt or title, that will pop up the yellow box with a caption, right? I want something a bit prettier.
There just has to be a way!

lukewakeford
lukewakeford's picture
Offline
Enthusiast
UK, West Sussex, Dorset
Last seen: 2 years 30 weeks ago
UK, West Sussex, Dorset
Joined: 2010-07-24
Posts: 71
Points: 84

What is the reason that the

What is the reason that the images can't be background images?

Luke.

prismspecs
prismspecs's picture
Offline
Regular
Last seen: 10 years 44 weeks ago
Timezone: GMT-4
Joined: 2010-10-31
Posts: 18
Points: 23

just the way the nav script

just the way the nav script works, it has to be an image and i don't know enough about jquery to customize it to that degree Sad

lukewakeford
lukewakeford's picture
Offline
Enthusiast
UK, West Sussex, Dorset
Last seen: 2 years 30 weeks ago
UK, West Sussex, Dorset
Joined: 2010-07-24
Posts: 71
Points: 84

Maybe post that script in off

Maybe post that script in off topic? might be a budding JQuery Person that can help!.

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 5 years 4 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

Maybe try changing your

Maybe try changing your existing CSS
FROM

.dock-item span {
	color: #000;
	display: none; 
	padding-left: 20px;
	position:relative;
	top:0px;
	z-index:3;
}

TO

.dock-item span {
	color: #000;
	display: none; 
	padding-left: 20px;
	position:absolute;
	bottom:0;
	width: 100%;
	text-align:center;
	z-index:3;
}

This seems to work just fine for me with your provided example.

all ยป http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

prismspecs
prismspecs's picture
Offline
Regular
Last seen: 10 years 44 weeks ago
Timezone: GMT-4
Joined: 2010-10-31
Posts: 18
Points: 23

:)

You are my savior.
Cheers!