Click to See Complete Forum and Search --> : A better way to do this?
ryanbutler
11-09-2007, 09:31 AM
Hi,
I have the following layout done for me here:
http://midwestwebdesign.net/sid/
I've been given absolutely positioned layers (yuck!) to work with. When I try and float the columns in the content area, it doesn't seem to work because the wrapper contains the background image and when I pull it up using a negative top margin it overlaps the header and navigation. If I stick with AP layers, then I'm going to have content height problems.
Anyone have suggestions?
WebJoel
11-09-2007, 12:46 PM
I could have a peek at this. Looks like it's a tough one...
I'm wondering though why you have #navigation outside of #container. If you make #container be "position:relative;", you can make "#navigation" position:absolute, position it and put it inside of "#content" the same way "#logo" is. And same for "#footer".
It solves certain issues to use "position:relative;" in the parent of everything on the page.
edit:
I jostled a few things around here, and made your external CSS be 'internal' so as to affect the changes I made.
I seem to be seeing exactly the same thing now in IE6 vs. Fx 2.0.0.9. Not sure if I addressed your issue, but I no longer see the 'overlap' that I was seeing before...
ryanbutler
11-09-2007, 02:16 PM
No particular reason for any of it actually. I haven't done a layout like this one and getting the content background to vertically grow or shrink based off of content is elluding me at the moment.
WebJoel
11-09-2007, 02:25 PM
content area to grow vertically for more content... okay, -I may have missed that. It appears that this is a 'fixed height' for #content. this can now go "auto" and the images should 'trail along' fine.
Let me know... this seemingly easy design is really quite complex... had me wondering much. :confused:
Centauri
11-09-2007, 09:39 PM
Intersesting layout, so I had a play (sorry Joel :D ) and came up with this html - not that difficult :<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Students in Design - Home</title>
<link href="sidstyles.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="wrapper">
<div id="header">
<h1>Students in Design - Home page</h1>
<ul id="nav">
<li><a href="#" class="navhome">Home</a></li>
<li><a href="#" class="navnews">News</a></li>
<li><a href="#" class="navabout">About</a></li>
<li><a href="#" class="navevent">Events</a></li>
<li><a href="#" class="navres">Resources</a></li>
<li><a href="#" class="navgal">Gallery</a></li>
</ul>
</div>
<div id="left-col">
<h2>Hello</h2>
<p>Welcome to SID., the Students in Design organization at Missouri State University. We are dedicated to helping current and future students in the design program by hosting exhibitions, speakers and creative activites. Throughout the year we have different trips as well as numerous meetings to encourage professional development within our membership. Oh yeah, we like to have a good time too.</p>
</div>
<div id="right-col">
<h2>Events</h2>
<dl id="eventlist">
<dt>10.26.07</dt>
<dd>SID travels to NYC.</dd>
<dt>10.03.07</dt>
<dd>Exhibition</dd>
<dt>09.28.07</dt>
<dd>Meeting 8:00 pm</dd>
<dt>09.15.07</dt>
<dd>T-Shirt Sales</dd>
<dt>08.23.07</dt>
<dd>Wecome Back!</dd>
</dl>
</div>
</div>
<div id="footer">
<p>email: <a href="malito:sid@gmail.com">sid@gmail.com</a> 301 South Jefferson Avenue, Springfield MO 65804</p>
</div>
</body>
</html>
which marks things up a little more semantically, and gets rid of that inaccessible image map...
I cropped the green image to reduce load time, and added another image slice for the header background - those images attached to this post.
Css I came up with is:* {
margin: 0;
padding: 0;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #000000;
background-color: #FFFFFF;
}
p {
padding-bottom: 1em;
}
#wrapper {
width: 920px;
padding: 0 49px;
margin: 0 auto;
background-image: url(images/sid_green.png);
background-position: center top;
background-repeat: repeat-y;
overflow: hidden;
}
#header {
height: 449px;
background-image: url(images/headerback.png);
background-repeat: repeat-x;
}
#header h1 {
float: left;
width: 525px;
height: 412px;
margin-left: -49px;
font-size: 1px;
color: #FFFFFF;
background-image: url(images/sid_animation_placeholder.gif);
position: relative;
}
#nav {
width: 409px;
height: 449px;
float: left;
background-image: url(images/SID_NAVIGATION.png);
}
#nav li {
list-style: none;
float: left;
}
#nav a {
font-size: 1px;
color: #FFFFFF;
width: 25px;
display: block;
}
#nav .navhome {
margin-top: 132px;
height: 65px;
margin-right: 35px;
}
#nav .navnews {
margin-top: 136px;
height: 62px;
margin-right: 68px;
}
#nav .navabout {
margin-top: 263px;
height: 70px;
margin-right: 40px;
}
#nav .navevent {
margin-top: 95px;
height: 80px;
margin-right: 42px;
}
#nav .navres {
margin-top: 214px;
height: 120px;
margin-right: 72px;
}
#nav .navgal {
margin-top: 260px;
height: 95px;
}
#left-col {
float: left;
clear: both;
width: 313px;
display: inline;
margin: -50px 35px 0 25px;
}
#left-col h2, #right-col h2 {
text-transform: uppercase;
padding-bottom: 1em;
font-size: 140%;
}
#right-col {
float: left;
width: 200px;
}
#eventlist dt {
float: left;
width: 5em;
}
#eventlist dd {
margin-bottom: 1em;
}
#footer {
width: 910px;
height: 58px;
margin: 0 auto;
text-align: right;
padding-top: 8px;
background-image: url(images/sid_bottom_cityscape_black.png);
background-repeat: no-repeat;
background-position: right top;
color: #FFFFFF;
font-size: 85%;
padding-right: 10px;
}
#footer a {
color: #FFFFFF;
margin-right: 30px;
}
#footer a:hover {
color: #CCCCCC;
text-decoration: none;
}
See if that works for you.
WebJoel
11-10-2007, 09:56 AM
Impressive piece of work my friend. :) I was thinking, -do I want to revisit this navigation with an unordered list, with the clickable links being 'positioned' to emulate a map.. (yes, -I would have) :D . And further, do a 'invisible span' to make the title of the anchor 'appear' on-hover, -to the left of the hotsspot and horizontally... You know, -a~la "tooltip"...
Certainly the background-image of what was it, -900px by 345px(??) needed some weight-loss. Manipulating graphics is not my speciality, but this would be simple a simple cut.
Curious: -I can see the first image fine (the green horizontal slice), -but the second image when I click the link, I get ...nothing. I can't even find it by randomly 'right clicking' on the white field, hoping to 'select' it for SAVE...
-I have been having this very same trouble with another thread (as many of you probably already are aware..). :confused: With the other thread, I CAN right-click and get 'something' to SAVE to desktop... -I just cannot SEE it... :confused: :confused:
-------------------------------------------------------------------------
I am using Fx on XP for this, and have tried IE-tab and still, -no image is visible for me. Same thing on other post...
ryanbutler
11-10-2007, 10:25 AM
Thanks Centauri...couple things...
I don't need the header green image
There's an odd break in the content area when you add more text in, what might be causing this?
WebJoel
11-10-2007, 12:39 PM
(..if I may share this thread please..)
Attached is the 'capture' of that second image. I was finally able to right-click/SAVE... -is this right? :confused: :confused: I see ...nothing. Is this a gradient or something? It's only the border this viewer provides that clues me in to the fact that this is an image.
This is the same issue I'm having over on that 'Netscape issue' thread...
ryanbutler
11-10-2007, 01:41 PM
Actually I believe I almost have this odd layout worked out. If I could figure out why when I try and float my list items on this page:
http://midwestwebdesign.net/sid/Events/Trips/index.html
It pops the black contact info out of sync, I think I'd be done.
EDIT - Looks like if I edit #extraNav and #footer to float left it works fine.
Thanks for the help.
Centauri
11-10-2007, 05:48 PM
-but the second image when I click the link, I get ...nothing. I can't even find it by randomly 'right clicking' on the white field, hoping to 'select' it for SAVE...
The second image is nothing more than a vertical white bar. I applied the green slice to the #wrapper (which can be a different colour slice on different pages by using a body id and doing a match in the css) and the white slice to the background of the #header div to give the impression of overlapping elements.
Centauri
11-10-2007, 06:19 PM
Thanks Centauri...couple things...
I don't need the header green image
There's an odd break in the content area when you add more text in, what might be causing this?
Green header image? - the green is applied to the #wrapper, and if you use a unique id for each different page, the background for each page can be selected via the css - for example, if the id of the trips page was "pgtrips", then the colour of the background can be selected by :#pgtrips #wrapper {
background-image: url(Images/sid_reddish.png);
}
If content is added within the #wrapper, there should be no break at all ...
Ryan, I noticed you have gone for Paul O'Brien's implementation that unfortunately still retains the image map - these things should be avoided due to accessiblity problems. Anyone using a screen reader will not be able to navigate the site, and search engines will never index past the first page.
WebJoel
11-10-2007, 06:46 PM
Vertical white bar, -okay. Understood. I thought that there was a gradient or something that I wasn't seeing.
I might go ahead and do this "UL" for this "map"... haven't done a good positioned-UL in a few weeks.. I could use the practice. :) I've got a few projects in the pipeline to get caught-up with, but shouldn't take too long..
ryanbutler
11-11-2007, 01:14 PM
If content is added within the #wrapper, there should be no break at all ...
I think it had to do with the border around the background image.
Ryan, I noticed you have gone for Paul O'Brien's implementation that unfortunately still retains the image map - these things should be avoided due to accessiblity problems. Anyone using a screen reader will not be able to navigate the site, and search engines will never index past the first page.
While I agree with your point, this is for a project that I'm lead on and it would be a worthless argument to make to the people involved. While on the topic, I would have never chosen to do my navigation like this in a million years, I think it's an accessibility issue with how it's orientated in the first place.
However, I do appreciate you and Web Joel's help.
WebJoel
11-11-2007, 06:33 PM
... While on the topic, I would have never chosen to do my navigation like this in a million years, -I figured that this was obvious to even the most causual of observers (hense, that I didn't bring it up first).
I re-did this in about 15-mins. using (I beleive) Stu Nicholls' little treat, -it's an "<ul>" now, and validates on TIDY, works IE6 / Fx 2.0.0.9.
I'm including the image in case you altered it in any way (size, etc.) but I doubt if you'd have done that. :D <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus" />
<meta name="Author" content="" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<!-- bssed entirely upon a model provided by cssplay.uk -->
<style type="text/css">
* {margin:0; padding:0; border:0;}/* Re-set IE to "zero" for these values */
body {background-color:#d8d8d8;}
#navigation {width:409px; height:449px; background: url(images/SID_NAVIGATION.png);
position:relative; margin:30px;}
#navigation li {margin:0; padding:0; list-style:none; display:block; position:absolute; border:none;}
#navigation a {display:block;}
#navigation1 {left:-5px; top:125px; width:35px; height:73px;}
#navigation2 {left:55px; top:130px; width:35px; height:73px;}
#navigation3 {left:149px; top:259px; width:35px; height:76px;}
#navigation4 {left:212px; top: 90px; width:35px; height:88px;}
#navigation5 {left:280px; top:211px; width:35px; height:127px;}
#navigation6 {left:378px; top:256px; width:35px; height:100px;}
/* do NOT declare any WIDTH on these next */
#navigation1 a {height:73px;}
#navigation2 a {height:73px;}
#navigation3 a {height:76px;}
#navigation4 a {height:88px;}
#navigation5 a {height:127px;}
#navigation6 a {height:100px;}
#navigation1 a:hover {background: url(images/navigation.png) -126px -256px no-repeat;}
#navigation2 a:hover {background: url(images/navigation.png) -170px -553px no-repeat;}
#navigation3 a:hover {background: url(images/navigation.png) -9px -313px no-repeat;}
#navigation4 a:hover {background: url(images/navigation.png) -70px -517px no-repeat;}
#navigation5 a:hover {background: url(images/navigation.png) -124px -364px no-repeat;}
#navigation6 a:hover {background: url(images/navigation.png) -94px -364px no-repeat;}
/* Remove this next line: it is only to show the 'hot spot' of the psuedo-class :hover */
#navigation1 a:hover, #navigation2 a:hover , #navigation3 a:hover, #navigation4 a:hover, #navigation5 a:hover, #navigation6 a:hover {border:1px solid red;}
</style>
</head>
<body>
<ul id="navigation">
<!-- Name of link is on colored image of flower. -->
<li id="navigation1"><a href="#nogo" title='Click to go to "HOME"'></a></li>
<li id="navigation2"><a href="#nogo" title='Click to go to "NEWS"'></a></li>
<li id="navigation3"><a href="#nogo" title='Click to go to "ABOUT"'></a></li>
<li id="navigation4"><a href="#nogo" title='Click to go to "EVENTS"'></a></li>
<li id="navigation5"><a href="#nogo" title='Click to go to "RESOURCES"'></a></li>
<li id="navigation6"><a href="#nogo" title='Click to go to "GALLERY"'></a></li>
</ul>
</body>
</html> what would be kewl now is, to have a CSS 'tool tip' box pop-up on-hover. Interested? I'll retain copy of this code for a few days, -could try doing this for personal know-how and if you want to see, I'll post-up again.
:)
ryanbutler
11-12-2007, 07:17 AM
Hi Web Joel,
I doubt I'm going to pursue anymore work on this. This is probably one of the more retarded layouts I've attempted.
WebJoel
11-12-2007, 07:58 AM
Hi Web Joel,
I doubt I'm going to pursue anymore work on this. This is probably one of the more retarded layouts I've attempted. I hear that! :cool:
Centauri
11-12-2007, 08:11 AM
This is probably one of the more retarded layouts I've attempted.
And that's what made it an interesting exercise to convert to a semantic non-table layout :)