Right now, in part of my css file I have the following: body { background-color:#000000; background-image:url("http://www.domain.com/image.jpg"); background-repeat:repeat; margin:0; } Is there a way to code it so that clicking on the image loads another website and for that other website to appear in a new window ?
I don't think that you can make link in css. U must post link in html file, for example: <body> <a href="http://yoursite.com" target="_blank"> </a> ...
U can also make it with JavaScript, but again in your *.php/*.html file. There are no way to make it in css, sorry.
target="_blank" Code (markup): is not valid XHTML, just to mention. CSS is for the styling, nothing more. Links can not be set in CSS, only in HTML.
CSM I know, but I usualy use html, not xhtml. Sorry for offtopic, I don't understand reason why it's better to use xHTML?
Maybe he uses XHTML? I did not say it's better to use XHTML. I only do XHTML when coding from scratch Oh and by the way: body { background-color:#000000; background-image:url("http://www.domain.com/image.jpg"); background-repeat:repeat; margin:0; } Code (markup): can be done in 2 properties: body { background: #000 url("http://www.domain.com/image.jpg") repeat; margin:0; } Code (markup):
body{ width:100%; height:100%; } #back_link{ display:block; width:100%; height:100%; } Code (markup): <a id="back_link" href="" onclick="window.open(this.href,'_blank');return false;"></a> Code (markup): You meant something like this?
Where do I put the following code for this to work: <a id="back_link" href="" onclick="window.open(this.href,'_blank');return false;"></a>
<html> <head> <style type="text/css"> body{ width:100%; height:100%; } #back_link{ display:block; width:100%; height:100%; } </style> </head> <body> <a id="back_link" href="http://example.com" onclick="window.open(this.href,'_blank');return false;">Click Here!</a> </body> </html> Code (markup):