CSS help
- Started
- Last post
- 14 Responses
- jysta
Morning all
This is gunna sound strange but anyone know how you can create a flash like invisible button using the a:href tag in html and CSS???
Basically I got a really big background-image on the html tag in CSS but need it to link to somewhere without adding any more elements.
Any Ideas???
- Timson0
does the image needs to be in the background? otherwise you could use a map on it.
- jysta0
yeah I tried that but the image would'nt centre when the page re-sized :-/
I think because the image is 1600x1200px
- ********0
div + blank gif link
- Stugoo0
Im not sure what your asking but its been a heavy weekend.
so if I'm reading this right:
massive image on the background, with a link in the center of the page that is say/
put a background: center; on the item with the background image.
then position the link in the center of the page by using
a:link, a:visited, a:active { height: 600px;
width: 900px;
left: 50%;
top: 50%;
position: absolute;
margin-left: -450px;
margin-top: -300px;
padding: 0;
z-index:0;
}
a:hover {border : 1px solid #ff0; }does that help?
- jysta0
:-)
THANKS
Stugoo
- jysta0
:-(
Doesn't work on IE
anyone know of a fix?
- jysta0
OK I have given the html and body tags height:100%; which works for IE7 but not for IE6
- jysta0
http://www.wickfordchiro.co.uk/h…
if anyone knows a way around the link issue for IE6??
- digilee0
dunno the ie issue but in safari you have a thin white line around the image.
- Nairn0
Why wouldn't you want to add any more elements? That's 'bad' html.
Witt's route is a good answer.
- TResudek0
Added to which, you have an image that fits 800x00 without any issues so you may want to take it out of the background and make it a regular image. Right now you have it expanded to 1600px wide which is making it bigger than it needs to be.
TR
- Stugoo0
I agree with the other lads, more content = better on a homepage basically.
if you wanted to stick to what you've got there then crop that image down to say. 650 x 420px ? put that image inside the adjust the height width on the css i gave you earlier to match. just make sure you adjust the height margins appropriately ( the margins should be 50% of the height/width respectively.)
that make sense?
- Stugoo0
ok wierd some of my response got cut out there put the image in the anchor tag, then make the background colour of the page #e7eefe;
- jysta0
Thanks for the help guys, yeah they wanted a welcome page before the site, to give a bit more visual impact to the web site, which currently looks a bit dull, iv given them a estimate for a re-design tho :-)
Image now cropped, thanks again/