Hi Guys,
I've got a site (<!-- m --><a class="postlink" href="http://ten28design.com/WIP/heglerart/index.html">http://ten28design.com/WIP/heglerart/index.html</a><!-- m -->) I'm working on for a friend/customer. I've got a centered "wrapper" div that contains all the content. No big deal there. But, where I've got just a blue background he wants me to replace it with a repeating collage of his art. No big deal there either. In addition, he wants that background to be a link to his gallery page(s).
I'm thinking of how to do it but it doesn't seem like the right way. I haven't tested this yet but if I put <a> tags around a div that filled all the viewable window and then put my #wrapper div inside that would it make everything on the page a link as the #wrapper would be a child of the #bkgrnd?
<body>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#"><div id="bkgrnd">
<div id="wrapper">all my content</div>
</div></a>
</body>
CSS:
#bkgrnd {
width: 100%;
background: url(images/bkgrnd.jpg);
}
#wrapper {
width: 750px;
margin-left: auto;
margin-right: auto;
}
This just doesn't quite seem right. Any ideas?I've appointed myself head of the Stupid Thread Title Police...
<!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/showthread.php?t=68822Alright">http://www.webdeveloper.com/forum/showt ... 822Alright</a><!-- m -->, guilty as charged.
But, did you get past my stupid title to my stupid problem?Hey... I hadn't actually read your question - no. I have now though...
You can't put 'a' tags around a div - it's not allowed. What you can do is this : <body onclick="javascript:location='http://bonrouge.com'">
It might cause problems though... Basically people wouldn't be able to click anywhere on the page except for links without being sent somewhere - in this case, to my site - in your case to the artist's gallery. But then - that's what you're looking for, isn't it?well maybe this isn't the correct route. I just want the areas to the left and right of the wrapper div to be links to the gallery. (well in addition to the nav item)
I'm going to look into doing as a three column page with the wrapper div being the central column and the two side columns being liquid. That seems like a more correct way of going about it.
Thanks for you comment, and I realize that the title is not informative. Probation maybe? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>event horizon</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
<!--
<!-- <!-- m --><a class="postlink" href="http://www.brainjar.com/dhtml/events/default3.asp">http://www.brainjar.com/dhtml/events/default3.asp</a><!-- m --> -->
function traceEvent(event) {
if (window.event) {
target = window.event.srcElement.id;
}
else {
if (event.target.tagName)
target = event.target.id;
}
if(target!="wrapper")
alert("Go somewhere");
}
//-->
</script>
<style type="text/css">
<!--
body {height:100%;} /* fake content for IE */
#wrapper {
width:500px;
height:500px;
border:1px solid red;
}
-->
</style>
</head>
<body onclick="traceEvent(event);">
<div id="wrapper">all my content</div>
</body>
</html>
I've got a site (<!-- m --><a class="postlink" href="http://ten28design.com/WIP/heglerart/index.html">http://ten28design.com/WIP/heglerart/index.html</a><!-- m -->) I'm working on for a friend/customer. I've got a centered "wrapper" div that contains all the content. No big deal there. But, where I've got just a blue background he wants me to replace it with a repeating collage of his art. No big deal there either. In addition, he wants that background to be a link to his gallery page(s).
I'm thinking of how to do it but it doesn't seem like the right way. I haven't tested this yet but if I put <a> tags around a div that filled all the viewable window and then put my #wrapper div inside that would it make everything on the page a link as the #wrapper would be a child of the #bkgrnd?
<body>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#"><div id="bkgrnd">
<div id="wrapper">all my content</div>
</div></a>
</body>
CSS:
#bkgrnd {
width: 100%;
background: url(images/bkgrnd.jpg);
}
#wrapper {
width: 750px;
margin-left: auto;
margin-right: auto;
}
This just doesn't quite seem right. Any ideas?I've appointed myself head of the Stupid Thread Title Police...
<!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/showthread.php?t=68822Alright">http://www.webdeveloper.com/forum/showt ... 822Alright</a><!-- m -->, guilty as charged.
But, did you get past my stupid title to my stupid problem?Hey... I hadn't actually read your question - no. I have now though...
You can't put 'a' tags around a div - it's not allowed. What you can do is this : <body onclick="javascript:location='http://bonrouge.com'">
It might cause problems though... Basically people wouldn't be able to click anywhere on the page except for links without being sent somewhere - in this case, to my site - in your case to the artist's gallery. But then - that's what you're looking for, isn't it?well maybe this isn't the correct route. I just want the areas to the left and right of the wrapper div to be links to the gallery. (well in addition to the nav item)
I'm going to look into doing as a three column page with the wrapper div being the central column and the two side columns being liquid. That seems like a more correct way of going about it.
Thanks for you comment, and I realize that the title is not informative. Probation maybe? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>event horizon</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
<!--
<!-- <!-- m --><a class="postlink" href="http://www.brainjar.com/dhtml/events/default3.asp">http://www.brainjar.com/dhtml/events/default3.asp</a><!-- m --> -->
function traceEvent(event) {
if (window.event) {
target = window.event.srcElement.id;
}
else {
if (event.target.tagName)
target = event.target.id;
}
if(target!="wrapper")
alert("Go somewhere");
}
//-->
</script>
<style type="text/css">
<!--
body {height:100%;} /* fake content for IE */
#wrapper {
width:500px;
height:500px;
border:1px solid red;
}
-->
</style>
</head>
<body onclick="traceEvent(event);">
<div id="wrapper">all my content</div>
</body>
</html>