Pure CSS two column page

I’ve been working on a web page that I want a left hand menu column on with the content being on the right.  Pretty easy right?  Well, yeah, unless you want a background color in the left hand column and you want it to extend all the way down to the footer, especially if the right hand column is longer than the left.  Well I did some web searching and what I came up with was the suggestion of putting an image as a background to create a virtual image… which is great if you want a fixed width column.  So after doing some looking I found a way to do it with CSS.  Now I by no means claim to be the originator, but I didn’t find this solution by searching google.

The results of the code below can be seen here (http://www.servergoon.com/samples/2column.html) , and yes, I purposefully used Red Green and Blue just so the concept would stand out a bit more.  The CSS attached to the html page is minimal to achieve what I wanted, please feel free to take it and use it as you may.  I’ve tested this on Chrome, Safari, Opera, Firefox and IE on a Win7 machine.  As always, your mileage may vary.

The code for the web page is :

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="header"> header </div>
<div class="content">
  <div class="contentLeft">
<ul><li>item1</li><li>item2</li><li>item3</li></ul>
 </div>
  <div>
  <p>Est purus in enim amet. In placerat integer in, platea porttitor, pulvinar elit aliquam nunc est, dapibus a aliquam odio amet. Elementum, urna magna sit? Placerat, sociis tristique ac hac! Pid aliquam aenean ac augue? In turpis aliquet amet, nunc massa etiam sit pid dapibus, lundium lectus augue. Sed a arcu et? Enim tortor sagittis? Augue? Sit scelerisque, duis eu, facilisis phasellus nisi elit porttitor, nascetur duis et augue purus tincidunt etiam. Dictumst sit in pulvinar phasellus, turpis, montes est, a ultrices nec tortor, rhoncus quis magnis? Nunc enim ut turpis pulvinar, duis dis non, elementum, augue dictumst in magna dis odio non et enim? Etiam! In purus parturient ridiculus. Nisi integer? Dis pulvinar proin turpis sed a a urna.</p>

<p>Porttitor dapibus purus? Aenean etiam? Turpis urna porta hac? Nunc amet, scelerisque? Vel in, ac? Habitasse pulvinar, natoque diam, ultricies nec scelerisque aliquam, pulvinar turpis, non! Tincidunt. Platea elit, mauris ac porta adipiscing! Nisi dignissim, proin auctor risus nec dapibus porttitor velit cras! Ridiculus? Odio integer lorem diam porttitor odio platea et tortor elementum! A, aliquam cras tincidunt in? Tincidunt duis, ut dapibus lectus et scelerisque, parturient urna, a massa ac, nunc cras turpis, aliquam, mus porttitor? Magna parturient phasellus in ac, est natoque tortor non. Adipiscing! Turpis ultricies, placerat turpis cum turpis adipiscing turpis. Elit turpis in integer? Pulvinar, est, odio aliquam tincidunt! Adipiscing dignissim, dignissim? Magnis auctor, a porta, lorem in mattis! Scelerisque phasellus rhoncus! Lundium tempor.</p>
</div>
</div>
<div> footer </div>
</body>
</html>

The css for the page is :

@charset "utf-8";
/* CSS Document */

.header {
	background-color:#00F;
	width:100%;
}
.content {
	width:100%;
	background-color:#FFF;
	clear:both;
	overflow:hidden;
}

.contentLeft{
	width:25%;
	margin-bottom:-999px;
	padding-bottom:999px;
	border-right:solid #000 1px;
	float:left;
	background-color:#0F0;

}
.contentRight{
	width:74%;
	float:right;
}
.footer{
	background-color:#F00;
	width:100%;
}

I hope you find this useful. It seem the key is the margin-bottom and padding-bottom in conjunction with the overflow:hidden of the containing folder.

–Server Goon

Posted in Technology, misc | Tagged , | 1 Comment

Road Rage part 2

First off, wow, been a while since I posted anything!  And second, told you there would be another post about road rage (see previous post).

Just for the record, I’m not a perfect driver, sometimes I do *ahem* stupid things.  Having said that, I feel it’s fair to comment on other drives and what stupid things they do.

It all started out rather fun, my brother and I was taking a motorcycle trip to see an Aunt and then we were going to put a few more miles and states on the bike (so far I’m ahead with 11 states under my “motorcycle” belt, at some point I hope to have all 50).  The first day’s itinerary was to get to my Aunt’s and I would like to say it was without incident, but that would be a lie.  It’s also a story for another day because what I’m talking about today happened on day 2 of our 3 day trip.

We were in Illinois on Route 1 when it happened.  Route 1 for the most part is a two lane highway with sections that are four lanes.  The particular stretch at the start was a four lane highway through a town with a speed limit of 35.  My brother and I were traveling at about 50MPH and keeping up with the flow of traffic.  That’s when I noticed a guy coming up behind pretty fast in an burnt orange mustang.  The lane to the right was clear but he stayed right behind my brother and I.  I decided to be nice and moved over to the right lane at which point he sped up to right behind my brother and started honking the horn.  When my brother moved over I heard the engine rev and he took off like a speed racer only to slam on the brakes to avoid hitting the car that we were following.  I immediately thought to myself “what a jackass”.

As we traveled through several smaller towns the guy was never more than two or three cars ahead.  We eventually got to a stretch of two lane road and ended up behind the same Mustang.  It seemed like it was hundreds of miles, but it was probably only 20 or 30 that we followed this guy.  The whole time he was weaving left and right, speeding up and slowing down while following the Chevy truck that was in front of him.  At one point, he even had his right hand turn signal on for probably five miles.  I told my brother at one point (probably at one of the crossroads with a stop sign) that the guy was just looking for someone to race because there were plenty of opportunities for this guy to pass, but he stayed behind the truck and continued to drive erratically.

Finally I told my brother “we have to stop and let this guy get away or pass him, I can’t stand this much longer”.  So, the next good clearing where my brother could see clearly (it was very hot day and the heat from the road was creating an hazy heat wave affect) my brother pulls and passes.  He then pulls back in between the Mustang and the truck because he sees a car coming towards us (his original intention was to pass both).  I follow my brother’s lead and pull out, as I get even with the Mustang, I hear him kick it down and speed up.  (Did I mention the word jackass before?)  Well, that just sets me off because it proved I was right about this guy just wanting to race.  He probably bought the Mustang to compensate.  At any rate, Mustang or no, my brother’s in front of him and my bike is no wimp.  As I kick it down a gear I flip the guy off passing him and my brother and pull back in line behind the truck.

I’m sure you can guess what happened next right?  Yeah, he’s revving the engine and good to go so he pulls out and guns past us.  I see him coming and flip him the bird the whole way past.  As he’s going past he’s staring at me and flipping me off as well.  So he goes past us (remember the car?) and goes past the truck diving back into the right lane almost clipping the front of the truck and I’m sure giving the folks in the oncoming car a fright.

Regardless, he’s gone and I’m happy to sit behind the truck cruising at 55 because now I don’t have to deal with an unstable erratic driver in front of me.  It made the rest of the trip seem so peaceful!

The amazing thing about this is that I usually feel guilty about doing “stupid” things, like flipping off that guy in the car.  Really, it wasn’t necessary and I’m sure it didn’t help the situation any.  However, this time I didn’t feel the least bit of guilt.  This guy was an idiot at best and how he was driving was creating a hazardous situation.

Stay safe, stay sane and keep the rubber side down.

–ServerGoon

Posted in Rants, motorcycles | Tagged , , | Comments Off

Press 1 for 1337, press 2 for English

Kids these days.  Spelling doesn’t matter, as long as the other person gets what you’re talking about.  If you don’t believe me, just ask my 17 year old son, he’ll tell you all about it.

Admittedly, I don’t think kids should be graded harshly for grammatical or spelling errors on math papers, computer program comments (I actually had a teacher that took off points for not having complete sentences in the comments for a program), physics, art, etc.  Now all bets are off when it comes to English class, because that’s what it is all about.

However, if you publish a game, write a paper about your physics experiments or create anything that is made for general population I would suggest making sure your grammar is correct in the final product.  Trust me, it’s tough for me and I’m just waiting for someone to point out a mistake on this post.

Prime examples of when it is important to use correct grammar:

  1. When you are trying to make a point or trying to sound intelligent.  See
    http://www.facebook.com/group.php?gid=274685879861 http://www.facebook.com/group.php?gid=260098416437
    and the list goes on I’m sure.  In fact I had great fun pointing that error out to my son when he joined the group “Parents call it talking back, we call it telling them there wrong”.
  2. When you are trying to sell something.  This is what originally prompted this post and I want to make it clear I have *nothing* against these guys or their site (notice I used the correct version there).  I was reading about Blue Collar Bobbers when I ran across this quote. “and ride into the sunset with there comrades”.  Now for some reason, this just glares at me.  Maybe it because I’ve struggled with it myself so I’m hypersensitive to the use of “there, they’re and their”.  Does that mean I won’t buy from them? No, but it does give a certain impression of the type of people running the store.  I’m also going to make the assumption that, based off of the design, they didn’t do the work themselves.  Chances are someone just wasn’t fully awake and didn’t catch the typo, let’s hope so because I’d hate to be paying someone for a finished product that wasn’t correct.

So, having said all that, I would suggest a remedial course.  If you don’t want to do that, how about spending a little time to get it straight in your head in whatever manner works best for you.  There’s even web sites out there to help.  I googled “there their they’re” and the top hit was a wikihow page, how convenient!

Up next is a rant about “you’re, your and yore”… no, not really, but I’m sure there are plenty of examples of that as well.

–servergoon

Posted in Education, Rants, misc | Comments Off

Virtual Addiction is REAL!

This really hit me today when I noticed a wall post from someone I know (in the real world).  They stated that they’d be gone for the weekend, but not to worry if anyone saw posts from them because they had asked someone to take care of their farm.  This is s VIRTUAL farm mind you.

So what is the importance of this? Well, I’m taking classes that are based on technology and education.  Part of those classes focus on social media and how the youth of today are more “wired” than ever.  With this wiring, comes this chance for addiction.  We are so concerned about drug and alcohol use in the youth of today, but what about internet use?

The youth of today run the very real risk of being socially dysfunctional when it come to interacting with with real people in real time.  They’ve all got lots and lots o’ friends online, but when it comes to preferences some would rather use the computer as an interface to interacting with their friends than face to face.  Of course, this is just based off of casual observations of my son and his friends.  Even when friends are over their interaction tends to be around the computer or game console.

And it’s not just the kids.  About a  year ago CNN published “Five clues that you are addicted to Facebook” http://www.cnn.com/2009/HEALTH/04/23/ep.facebook.addict/index.html and that’s not the only danger.  I’ve seen stories of kids being left alone while parents played online games.  Kids left alone to the point of being considered child neglect or abuse.

So, does that mean we should all become unplugged?  Nah, but if you can’t be “disconnected” for a day or two without starting to twitch, you may want to take a serious look at your usage.

–servergoon

Posted in Education, Rants, misc | Tagged , | 1 Comment

FaceBook, the “new” news channel

There was a plane crash in the area last night.  I found out about it on FaceBook…  Great news and media outlet this FaceBook right?  Well, yes, I guess it is, as a way to keep up with friends and family and find out what’s happening in their lives that you might not normally know.

But the way I found out about this was by the status of a FaceBook Friend, it read “OMG i think there has been a plane crash n Albany“.  That’s news enough right?  Lets you know what’s going on.  There are couple of comments and then this person says “I am gonna go check it out I will report back” (first outlined comment).

Okay, now this is where I have the problem.  See, I left my Cub Reporter badge in the drawer when I realized that in cases where there are accidents, unless you are a trained professional or asked to help, chance are you are going to be in the road and more of a hindrance than a help.  [Subtitle Road Rage Part II cause you all know those people that practically *stop* as they go by an accident so they can, what? hopefully see blood?]  At any rate, this person who was safe and secure at home decides it is their duty to go and find out what’s going on.

Which leads to “Ok just got back…if you go out Washington Rd just past Albany that is where it happened…pretty much across from the airport. I couldn’t get close enough to see anything they closed the road and you had to turn around. I will listen to the scalnner for any updates” (the second outlined comment).  Now this comment just more or less proves my point really.  They had closed the road down, probably for safety reasons, something about aviation fuel and flammable perhaps?  So what did they manage to do?  Add to the congestion, cause potential blockage for emergency vehicles AND put yourself in danger.  But they got some great news right?  Some pictures?  Got a name?  Oh no, they didn’t because they “couldn’t get close enough to see anything”.  So what did they do?  They went back home to listen to the scanner and report any updates.  Now we know why most major cities have stared scrambling/coding the emergency radio traffic so they don’t have this problem in the first place.

I can understand human curiosity, and quite frankly, if the plan had crashed next to my house I would have been outside seeing what I could do the help.  But to leave my house, drive to another location just to see a wreck… not me, no thanks, and I’m sure the emergency responders thank me too, cause that’s one less person they have to watch out for.

Posted in Rants | Tagged , | Comments Off