Click to See Complete Forum and Search --> : Links/Layer Help
kaio393
09-19-2007, 05:50 PM
I am designing this site:
http://orphicinc.com/google
and need to know how make the icons linked. I originally had the entire thing as one image and just added a new layer in DW for the text
But I figured it would be impossible to code so I made each of the icons their own image, and just filled in the remaining area.
I know how to add them in as links, but when I add them in they look fine in DW but when I preview it (in FF, mind you) they are way off where they are supposed to be
WebJoel
09-19-2007, 06:16 PM
<style type="text/css">
<!--
body {
background-color: #010c1e;
}
.style1 {
font-family: "Segoe UI";
color: #FFFFFF;
}
.style2 {color: #000066}
-->
</style>
<script src="http://orphicinc.com/googleScripts/AC_RunActiveContent.js" type="text/javascript"></script>
<title>Uber Googlers</title><div align="center"><img src="http://orphicinc.com/google/images/lay.jpg" width="800" height="800"></div>
<p> </p>
<DIV id="Layer1" style="position:absolute; left:369px; top:160px; width:272px; height:608px; z-index:1">
<p class="style1">9.18.07 Site Creation</p>
<p class="style1"> </p>
<p class="style1"> </p>
<p class="style1">By the way you need <span class="style2"><a href="http://www.softpedia.com/progDownload/Segoe-UI-Windows-Vista-System-Font-Download-75006.html" class="style2">this font</a></span> to view this page properly</p>
<p class="style1"><a href="http://getfirefox.com" class="style2">Firefox</a> might help, too</p>
</DIV> -This is the entire code? Granted, the majority of commonly-used tags are optional, your STYLE refers to "body" but there isn't even a "body" stated in the HTML... A well-formed HTML-document should have least these:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>YourPage</title>
<style type="text/css">
</style>
</head>
<body>
</body>
</html> at the very least. :o
kaio393
09-19-2007, 09:26 PM
thanks but that didn't really change much at all :-/
i updated the link to see where I'm stuck
I placed the Google icon layer in the designer side of DW where it originally was, and look where it ends up
Centauri
09-19-2007, 10:24 PM
You have a few errors here, like multiple id's - an id can only be used once per page. Youi have absolutely positioned other divs over top of the first one, which is why the links are not clickable.
Instead of all that absolute positioning, place the image as a body background centered, and use a normally-positioned wrapper div to hold the contents - this div can then be centered to overlay the background image.
Try this html :<div id="contentWrap">
<p>9.18.07 Site Creation</p>
<p> </p>
<p> </p>
<p>By the way you need <span class="style2"><a href="http://www.softpedia.com/progDownload/Segoe-UI-Windows-Vista-System-Font-Download-75006.html">this font</a> to view this page properly</p>
<p><a href="http://getfirefox.com">Firefox</a> might help, too</p>
<a href="http://google.com"><img src="images/googleicon.jpg" border="0" height="103" width="58"></a>
</div>
with this css: body {
background-color: #010c1e;
background-image: url(images/splash.jpg);
background-repeat: no-repeat;
background-position: center top;
font-family: "Segoe UI";
color: #FFFFFF;
}
a {
color: #000066
}
#contentWrap {
width: 260px;
height: 608px;
margin: 0 auto;
padding-top: 140px
}
DW rule-of-thumb: DON'T place things in design view - work in code view.
kaio393
09-20-2007, 03:28 PM
ok, great, thanks but the only thing is how do I move the icon to the side? like the very left almost
Centauri
09-20-2007, 05:30 PM
By "the icon" you mean the google image? Where would you like it? Do you have a picture of where things are to be positioned (whilst the graphic looks good, I'm not real sure of its relevance to where content is to be placed).
kaio393
09-20-2007, 08:13 PM
well i've almost figured it out, but not quite.
I have re uploaded the code, and if you look closely the pixels aren't exactly aligned
Centauri
09-21-2007, 12:13 AM
Ok, now I have more of an idea of what you want to do - have content in the side "wings". I wasn't impressed (and neither would other visitors) with the javascript resizing my browser window to try and make the absolute positioning line up.
This can be treated as a 3 column layout, with left and right columns being the "wings", with a centre content column, and this changes the approach. If the entire site is contained within a wrapper that is the total width of the graphic, left and right columns the appropriate widths can be floated left and right, and the content column will sit between when given appropriate side margins. Top padding on the side colums will bring the content down into the "wing" area.
The google icon can then sit in the left column as a standard text link with the image as a background - a left margin will position it correctly to line up with the background.
Try this:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css">
<!--
* {
margin: 0;
padding: 0;
}
body {
background-color: #010c1e;
background-image: url(images/splash.jpg);
background-repeat: no-repeat;
background-position: center top;
font-family: "Segoe UI", Geneva, Arial, Helvetica, sans-serif;
color: #FFFFFF;
}
a {
color: #000066
}
p {
margin: 1em 0;
}
#pagewrap {
width: 700px;
margin: 0 auto;
padding-right: 3px;
}
#leftcol {
float: left;
width: 187px;
padding-top: 310px;
}
#googlelink {
display: inline;
width: 58px;
height: 103px;
float: left;
background-image: url(images/googleicon.jpg);
font-size: 1px;
color: #F3F528;
margin-left: 19px;
}
#rightcol {
float: right;
width: 180px;
padding-top: 310px;
}
#contentWrap {
margin: 0 207px 0 220px;
padding-top: 150px;
}
</style>
<title>Uber Googlers</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div id="pagewrap">
<div id="leftcol">
<a href="http://google.com" id="googlelink">Google</a>
</div>
<div id="rightcol">
<p> </p>
</div>
<div id="contentWrap">
<p>9.18.07 Site Creation</p>
<p> </p>
<p> </p>
<p>By the way you need <a href="http://www.softpedia.com/progDownload/Segoe-UI-Windows-Vista-System-Font-Download-75006.html">this font</a> toview this page properly</p>
<p><a href="http://getfirefox.com">Firefox</a> might help, too</p>
</div>
</div>
</body>
</html>
This will sit in the centre and everything lines up without that resize javascript, so it is gone. The different side column widths and right padding on the #pagewrap are due to the main background image not being quite symmetrical.
Note that I also specified alternate fonts in the body font family for those that don't have, and don't want to install, your preference font.
kaio393
09-21-2007, 10:28 PM
ok, now this is how i designed the image in photoshop, how can i go about doing the rest of it?
http://img300.imageshack.us/img300/5823/layoutia8.jpg
Centauri
09-22-2007, 03:08 AM
Aclose look at your mockup shows the icons are 82px apart centre-to-centre and 108px between the tops of vertically aligned icons, so if we make the <a> tags 82x108 and position the background images at the top centre, the spacing takes care of itself when the links are all floated (left on the left column and right on the right column). A little adjustment on the column paddings and defining set heights and paddings on the column headings lets everything sit in place.
The html for the columns section can then be : <div id="leftcol">
<h2>-Google Links</h2>
<a href="http://google.com" class="link1">Google</a>
<a href="#" class="link2">Link2</a>
<a href="#" class="link3">Link3</a>
<a href="#" class="link4">Link4</a>
</div>
<div id="rightcol">
<h2>Uber Links-</h2>
<a href="#" class="link1">Calendar</a>
<a href="#" class="link2">Forums</a>
<a href="#" class="link3">Staff</a>
<a href="#" class="link4">Facts</a>
</div>
and the associated css :#leftcol {
float: left;
width: 172px;
padding-top: 269px;
padding-left: 15px;
}
#leftcol h2, #rightcol h2 {
font-size: 115%;
line-height: 30px;
padding-bottom: 5px;
font-weight: normal;
}
#leftcol a {
float: left;
width: 82px;
height: 108px;
background-repeat: no-repeat;
background-position: center top;
font-size: 1px;
color: #0D81CE;
}
#leftcol .link1 {
background-image: url(images/googleicon.jpg);
}
#leftcol .link2 {
background-image: url();
}
#leftcol .link3 {
background-image: url();
color: #004286;
}
#leftcol .link4 {
background-image: url();
color: #004286;
}
#rightcol {
float: right;
width: 165px;
padding-top: 269px;
text-align: right;
padding-right: 15px;
}
#rightcol a {
float: right;
width: 82px;
height: 108px;
background-repeat: no-repeat;
background-position: center top;
font-size: 1px;
color: #0D81CC;
}
#rightcol .link1 {
background-image: url();
}
#rightcol .link2 {
background-image: url();
}
#rightcol .link3 {
background-image: url();
color: #004286;
}
#rightcol .link4 {
background-image: url();
color: #004286;
}
It is then a matter of inserting the link url's and text and inserting the appropriate graphic in the link classes css. The color assignment on the links hides the text against the background.
kaio393
09-22-2007, 11:53 AM
Hm, I placed the images at the right spots...
http://orphicinc.com/google/index2.html
Centauri
09-22-2007, 12:06 PM
Somehow, you deleted this from the html :<body>
<div id="pagewrap">
<div id="leftcol">
and this from the css :#pagewrap {
width: 700px;
margin: 0 auto;
padding-right: 3px;
}
kaio393
09-22-2007, 01:28 PM
Hah! Brilliant dude!
Thanks so much for the help ^__^
but one last thing
it kinda cuts off the background deal...
Centauri
09-22-2007, 07:41 PM
If you want to be able to scroll right down and see all of the background, add a height to the wrapper :#pagewrap {
width: 700px;
margin: 0 auto;
padding-right: 3px;
height: 800px;
}
kaio393
09-23-2007, 09:43 AM
I knew it was somewhere in there,,,, kept fiddling with it, but only ended up weirdly... thanks :)