Navigation not displaying properly

Hello everyone,

I wanted to make a website using css and html. (the proper way). Everything was going fine untill I hit a problem with my navigation. It’s not displaying as I intended.

I want the navbar to stick to my header so I can get a nice black area and I want my menu to be a tabbed navigation menu. I’m not entirely sure if the way I’m doing this is the correct way. The navbar sticks to my header when I don’t insert any ul or li tags.

this is my css:

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

body{
	background:#000 url(images/background.jpg);
	color: #cbcac9;
	font-family: Georgia, "Times New Roman", Times, serif;
}

/*boxes*/

#wrapper{
	margin-left: auto;
	margin-right: auto;
	margin-top: 50px;
	width: 1054px;	
	color: #cbcac9;
	font-family: Georgia, "Times New Roman", Times, serif;
	
	
}

#header{
	background:url(images/headerblack.png) top no-repeat #000;
	width: 1003px;
	height: 226px;
}

#navbar{
	background:#000;
	width: 1003px;
	height: 35px;
}

#maincontent{
	width: 1003px;
	background:#FFF;
	display: inline-block;
	
	
}

.clearfix { display: inline-block; }

#maincontentleft{
	float: left;
	width: 500px;
	margin-left: 20px;
	background:#FFF;
}
#maincontentright{
	float:right;
	width: 250px;
	margin-right: 15px;
	background:#FFF;
	border-left: #cbcac9 1px solid;
}

/*navigation*/
#navbar ul{
	list-style:none;
	margin-left: 10px;
	padding: 0 0 0 0;
	
	
}

#navbar li {
	float: left;
	background:url(images/tableft.jpg) no-repeat;
	margin: 0 1px 0 0;
	padding: 0 0 0 8px;
	height: 35px;
	
	
}

#navbar a{
	float: left;
	display: block;
	background: url(images/tabright.jpg) no-repeat right top;
	padding: 0.5em 0px 0.5em 0;
	text-decoration:none;
	color: #805b1e;
	height: 35px;
	
}


url to the site is www.rockarena.be

so my question is: can someone please get me some pointers as to what is going on exactly so I can finish this design.

The full modern version (which I also have installed) and the legacy version I use as my primary both work with a great many photoshop filters/plugins as well.

[QUOTE=deathshadow60;4606838]Automatic anti-aliasing is fine for things that are animated where a line or two of pixels being off isn’t noticeable, but with static images I wouldn’t trust Photoshop to handle jack.

But there’s a reason I’ve gotten rid of ALL adobe tools off my machine - on top of being sick of them damned near hijacking the host OS, Photoshop and it’s kin drop the ball on simple AA (it’s like they do 2x instead of 8x) and wouldn’t know optimized saving of images from a jelly donut.

What do you use as an alternative?

I’ve yet to get my head around what’s happening out there in mobile land. Every time I try to get an overview of what kinds of mobile browsing platforms are in use I get totally befuddled by the techno babble that doesn’t tell me anything much. I’ve never browsed the web on a phone (except once on an iPhone), so that partly explains why I’m out of touch. I do like Opera’s small screen view, but I have no idea who/what devices use it anyway, and there’s such a plethora of mobile devices out there, where do you start getting your head around it all?

I’ve learned from bitter experience that going into a mobile phone shop is NOT the way to get any intelligible info. My god, those guys are simply INCAPABLE of explaining what their phone plans actually mean (probably, I suspect, because they don’t WANT me to understand them.)

Example conversation:

HIM: “You get $300 worth of calls for just $50 on this plan!”

ME: “Pal, if it costs $50, then it’s $50 worth of calls, not $300 worth.”

HIM: “Huh?”

UNFORTUNATELY they’re not going anywhere and if anything are becoming more common.

THANKFULLY they are finally increasing in capabilities and power to the point where you have to worry less and less about customizing to them. Android’s version of Chrome, the IPhone’s version of Safari, and Opera Mobile/Mini all being robust enough that they can display most existing websites code in a usable (though not perfect) format on the small screens without having to write “for them”

Too bad that’s still less than 20% of the market, with win Mobile IE 5/6 still being another 20%, the rest filled with proprietary garbage like Nokia’s in-house browser or specialty ones like Blazer.

Yes, you mentioned that in anther post, but those devices are all a mystery to me. When I hear about them, it’s like being told there are rats in the roof. I just shudder and hope they will die off or go away. :wink:

PS Thanks for the explanation above. Funny, I’ve never even though of resizing the menu etc text. Maybe that’s why Apple doesn’t bother.

Hmm, neither Safari, Chrome or FF ever give me any grief. Occasionally IE will need some nudging, but I’m pretty conservative and tend to make code pretty simple and “fail safe”. Honestly, Opera is the browser I’m most likely to find quirk in.

Funny you consider it crappy, since for me it was a definate “It’s about time”. In any case if you use %/em with px images it’s very prone to breakage on windows Large font/120dpi, windows CE and some linux handhelds 72dpi, and windows 7 “ten foot” modes of 150% to 200% (144pi to 192dpi) - much less the next gen displays that are looking to DOUBLE the resolution at the same size relying on content scaling for legacy support. (something Win7 and IE8 are already set up to handle)… 3840x2400 at 24" here we come… (leaving everyone else in the industry in catchup mode)

I haven’t tested fluid/elastic designs in all media, but have found that even on gigantic screens (30 inch) they work nicely for me (well, the way I do them). Just today I’ve been reading sites with full page zoom and text only zoom to compare. Still much prefer text only. Even on fixed width sites, I prefer the content to reflow, rather than the lines become overly long.

Hmm… Being on the fisher price “my first computer” :smiley: could have something to do with your issues. Kinda ties one hand behind your back on development doesn’t it? (well, I suppose with VM’s not so much anymore since you can at least run XP in a Window)

Indeed, I use VMware, have three versions of IE I can test in, the iPhone simulator… all right on my little laptop. Means I don’t have to run off to test sites on different computers. From that point of view, I find it a much nicer dev tool. (And it looks a whole lot nicer, too, which is nice since I have to stare at it all day.) Wish there were better methods for testing on other mobile devices, but ah well…

You mentioned using % on images - calculating 1:1 on pixel ratio for that usually ends up broken

Yeah, usually I leave images in px and just let the rest of the layout resize. Full page zoom doesn’t allow for this. :mad:

For example, how do you enlarge the fonts of the OS X GUI 25-100% again?

Heh heh, I don’t even know what that means. But perhaps that’s your point!

Combines into such a mess it makes IE 5.5 look good.

I have an old Mac that still has IE 5.5. I only rarely fire it up and play with IE 5.5 these days, but lemme tell ya, there’s NOTHING good looking about that old piece of ****!

Does in Opera using semi-fluid layouts, or if you hit ‘fit to width’ - though the latter can often cause rendering errors on sites not being resized, so it’s good to turn that one off when done. It’s actually present because Opera uses the same engine for all versions (mobile/mini/desktop/ds/wii) so why not make it available on all?

On windows dating back to windows 3.0, I can go in and say “medium fonts (win7) large fonts/120dpi (vista/xp/2k/98/95) or 8514 (win 3.x)” (the name varies depending on how far back you go) and ALL font measurements that are pt/%/em across the ENTIRE OS in EVERY program will automatically enlarge 25%. STarting with windows 98 you could set any custom size, and starting with Win7 they downgraded “120dpi” to being called “125%/medium” with “100%/small” being the default and introducing 150% (144dpi) as the new “large”. It now goes up to 1000% and has the option for “legacy application scaling” to upsize old programs (or goofy crap that was poorly written) so they appear at the proper size… 200% for example looks really good on your large (40"+) 1080p displays at about six to ten feet distance.

Some handhelds and linux devices can do a 72 or 75dpi setting - with 96 being the norm. Even legacy Mac will often use 72dpi as it’s default under the old MacOS because that was the physical measurement of the display. This often plagued web developers on the Mac as IE3/earlier, mosaic and Netscape 2/earlier used the system size so text was always smaller than it’s windows counterpart. In IE4 and Netscape 3 on the Mac they forced it to 96 dpi, leading to some developers (like the ones writing for webkit) thinking that 96dpi is the only metric any computer would/should/can use. (which is pure grade A fertilizer)

For example, take a look at the screencap of Medium/125% on Win7 from this machine.
[url=http://battletech.hopto.org/images/workstation/desktop_kinda_jan2010.jpg]
Click for Larger - *** WARNING *** 1.4 megabytes 5568x1280

… and you’ll see what LF/120dpi delivers SYSTEM-WIDE. Opera and IE both obey it, though FF and webkit do not (though you can fake it in their preferences). It’s kind of funny when I post my screencaps I usually get people going “Why are the fonts so huge?”

The Mac gives you no such control options. You don’t like the absurdly undersized default fonts on the program menu? title bar? TOUGH. You’re SoL. Shame since Apple’s renderer would be MORE suited to higher resolution displays with larger font sizes than Cleartype is, and it means when those next gen displays drop the Mac is going to suck even MORE since it won’t even be able to use them - at least not without a magnifying glass. Also a contributor to AppleTV being a flop, since it’s so called “ten foot UI” was anything but.

For example, I connect my primary display here (24" 1920x1200) to my hackintosh (semi-legal, it’s a Atom board stuffed into a Apple IIE case - so it’s still an “apple branded computer”) - it’s completely useless for me at a comfortable vieweing distance (two and a half to three feet) because I can’t even read the menu or the title bars at native resolution - and they provide no elements in the user interface for correcting that because both Cocoa and Carbon have ZERO provision built in for dealing with the mere notion of the fonts on things like menus, titlebars - or even most dialog boxes being different from their default.

Which is why from an accessibility standpoint the Mac is still two decades behind Windows. (and a decade behind your mainstream *nix flavors)… Which as someone who’s legally blind is something of a takeaway from it. (legally blind means I can’t read street signs more than 10 feet away, NOT that I can’t see.)

You mean IE 5.2 - there was no 5.5 for Mac… Oddly, most of my websites would function near identical in 5.2 as they do in 6 since it’s not THAT hard to code around. Just never declare fixed width or height the same time as padding and border, and you’re usually fine. Also why I avoid using margin unless I have to.

… and remember, Windows CE based devices only got IE6 two years ago with IE 5.5 being the ‘norm’ on that platform. (No joke!) Did you miss the “6 on 6” party? That’s ok, so did everybody else :smiley:

Automatic anti-aliasing is fine for things that are animated where a line or two of pixels being off isn’t noticeable, but with static images I wouldn’t trust Photoshop to handle jack.

But there’s a reason I’ve gotten rid of ALL adobe tools off my machine - on top of being sick of them damned near hijacking the host OS, Photoshop and it’s kin drop the ball on simple AA (it’s like they do 2x instead of 8x) and wouldn’t know optimized saving of images from a jelly donut.

See, my reaction to it was “ah, finally FF stops reacting like nyetscape 4’s sweetly retarded cousin and joins us in this century”

Oh they are - if you use browsers that handle it PROPERLY like Opera, since it will tend to constrain the site if possible, and if it doesn’t you can always hit ‘fit to width’…

Though in this case it doesn’t because it’s fixed width - which I’d at least change it to semi-fluid.

That attitude only comes about if you think FF is always right - in which case you end up struggling getting anything to work in webkit (saffy and chrome) too. Firefox has just as many broken/invalid behaviors as IE7, but daring to point that out usually gets you shouted down by the FLOSS fanboys for daring to say anything is wrong because “Open source fixes things faster” – my ass. Hey, how’s bugzilla 915 (circa 1998) coming along? Here’s an idea, how about instead of dicking around with specifications not even out of draft - aka HTML5 and CSS3 - you get HTML 4 and CSS2 working properly first? Oh wait, that’s not flashy or trendy so being open source it will NEVER be fixed.

Funny you consider it crappy, since for me it was a definate “It’s about time”. In any case if you use %/em with px images it’s very prone to breakage on windows Large font/120dpi, windows CE and some linux handhelds 72dpi, and windows 7 “ten foot” modes of 150% to 200% (144pi to 192dpi) - much less the next gen displays that are looking to DOUBLE the resolution at the same size relying on content scaling for legacy support. (something Win7 and IE8 are already set up to handle)… 3840x2400 at 24" here we come… (leaving everyone else in the industry in catchup mode)

Hmm… Being on the fisher price “my first computer” :smiley: could have something to do with your issues. Kinda ties one hand behind your back on development doesn’t it? (well, I suppose with VM’s not so much anymore since you can at least run XP in a Window)

Off Topic:

Back when I had my computer store here in Keene, people used to compare me to Mick from CAD - funny since I was a Apple certified repair tech at the time… Being Apple certified meaning I knew how to dial the phone, copy down a RMA number and box the thing up for a replacement since it’s effectively impossible to ACTUALLY fix one…

You mentioned using % on images - calculating 1:1 on pixel ratio for that usually ends up broken, and I hate the variation in resizing techniques … at that point let the browser handle it - even if webkit still thinks it’s 1998 on that subject.

But really, I think the differences between our approaches comes down to our different platforms and preferences. I’m a large font/120dpi (win7 medium scaling) user, so I think support for that more than I do the necessity of even using zoom in the first place… since people who care about accessibility USUALLY aren’t using Gecko, Webkit or OS X in the first place since they lack proper handling of it.

For example, how do you enlarge the fonts of the OS X GUI 25-100% again? Oh wait, you don’t… well, unless you want to try the mostly broken “user interface resolution” thing under Quartz Debug and laugh at menu elements overlapping each-other. **** useless man.

Combines into such a mess it makes IE 5.5 look good.

Wonderfull! I’m going to read through the whole thing tomorrow! I have two questions already if you don’t mind:

  1. The original design had rounded corners on the header div. That doesn’t exist anymore now. In order to get this right from the first time, what do I do? My solution would be to just implement the header div again and place the background image of the rounded corners at the top. Is this good practice or not?
  2. The graphics of the menu had a problem with anti aliasing you say. I’m sorry of this sounds ignorant but what does this mean? I’m a n00b at design so sorry! :wink:

Many thanks for the help. If I can ever help you with java, perl or python, just ask away! :smiley:

PS couldn’t help myself! I started looking better at the code! It’s brilliant! Very brilliant! I’m not sure I understand everything yet but ut’s a big leap from all the stuff I read in that one book!! It’s brilliant! Nice!

Nice, I’m going to look into it. It seems it’s also cheaper then photoshop. Thanks for the tip!

No, using the latest FF, but I prefer to zoom text only. Was very disappointed when browsers mane the whole page zoom by default. I don’t use that, as most sites don’t have anything like max-width: 100%, so you end up having to scroll left and right. Most web designers currently are not creating sites that are optimized for zooming.

Sorry, Opera user in me just flared up.

I don’t get the “love Opera” crowd at all. I find it more unpredictable and annoying than IE6.

text-resizing has gone the way of the dodo which is why NONE of the current browser default to doing it. (well, I’ve not tested Saffy lately)…

Yep, it’s the same.

it sounds like you are using pre-2001 techniques for content scaling instead of the MODERN approach - which is why I make anything with an image interaction that WOULD break on resize as px so it doesn’t - but ALWAYS leave my content as %/EM or even PT.

Not sure what the modern approach is, but I use ems for most things, like text and element widths; sometimes % for divs; and sometimes px for images, though I prefer %, even though it’s frowned upon. (I guess I’ll rethink that is most people are using this crappy whole page resize option now. :wink: )

SOUNDS like you might want to look at setting your computer (if windows) to large fonts/120 dpi or if Win7 even higher, and/or changing the default font-size in your browser if said browser (gecko, webkit) ignores the system metric.

Mac all the way here, but I’ll stick with ⌘+ for the foreseeable future.

people using broken/outdated zoom methods should be used to sites breaking by now - that’s why FF 3.5+ damned near hides resizing JUST the text.

O well, I just have to accept that. :eye:

@ds

I’ve looked up anti aliasing! I used photoshop to design the site so I don’t get why the antia aliasing went wrong. I’ll look into it.

Could you give me some tutorials, references I could use to study a bit further?

How would you put those rounded corners on the header? I would still use a header div. :smiley:

Yes, but frankly, you don’t need a DIV around either of those tags in the first place! They are perfectly good block level containers all to themselves.

Since your just starting out, I’m going to give you a few pointers:

You really shouldn’t have two H1. One H1 per page, and lower order headings mean the start of SUBSECTIONS of the higher heading before it… so that second one should be a h2, JUST like the one in your sidebar.

Your id’s are a bit confusing as well, and I’d advise AGAINST whitespace stripping. Get some tabs and extra carriage returns in there to make keeping track of everything less of a headache…

The image replacement method on the header is also not all that great, since images off there’s still no header text showing. I would suggest you research “gilder-levin” image replacement for doing that - it’s a fairly simple technique where you use a dummy span absolute positioned over the text. Images off you get the text, images on you see the image. The “slide it off” with text-indent approach doesn’t do that. (though it’s still better than just using an IMG tag for what IMHO is a presentational effect)

Likewise on your menu, I really advise AGAINST using the LI as part of your sliding doors implementation. Not only will you need scripting assistance to make it work in IE6/earlier, LI as a rule of thumb are a royal pain in the backside.

To that end, I would suggest adding SPAN sandbags and absolute positioning them in a right margin on the parent anchors thus:
<li><a href=“#”>testtesttest<span></span></a></li>

It’s just more reliable cross-browser and easier to code to, especially if you want to add hover states later on.

I would also advise that since you are writing a NEW page, there is NO legitimate reason to be using a tranny doctype. Tranny is for supporting old/outdated/outmoded coding techniques that have no business being on a modern page - Work in STRICT, it’s simpler since there are less tags and it’s clearer what you should be doing in your markup and what you shouldn’t. Likewise you should get some language attributes in there, and I’d probably also get media types on that CSS embed.

That all put together would result in markup like this:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
	xmlns="http://www.w3.org/1999/xhtml"
	lang="en"
	xml:lang="en"
><head>

<meta
	http-equiv="Content-Type"
	content="text/html; charset=utf-8"
/>

<meta
	http-equiv="Content-Language"
	content="en"
/>

<link
	type="text/css"
	rel="stylesheet"
	href="screen.css"
	media="screen,projection,tv"
/>

<!-- 

	Don't forget to implement these later!

<link
	type="text/css"
	rel="stylesheet"
	href="print.css"
	media="print"
/>

<link
	type="text/css"
	rel="stylesheet"
	href="handheld.css"
	media="print"
/>

-->

<title>
	Naamloos document
</title>

</head><body>

<div id="pageWrapper">

	<h1>
		De Kelle Cigars
		<span></span>
	</h1>

	<ul id="mainMenu">
		<li><a href="#">testtesttest<span></span></a></li>
		<li><a href="#">test<span></span></a></li>
		<li><a href="#">test<span></span></a></li>
	</ul>
	
	<div id="fauxColumns">
	
		<div id="content">
			<h2>Lorem ipsum</h2>
			<p>
				Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
			</p><p>
				Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
			</p><p>
				Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
			</p><p>
				Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
			</p>
		<!-- #content --></div>
		
		<div id="sideBar">
			<h2>Lorem ipsum</h2>
			<p>nduijqhsdjnqdnqjdnh</p>
		<!-- #sideBar --></div>
		
	<!-- #fauxColumns --></div>

<!-- #pageWrapper --></div>

</body></html>

You’ll notice I’m quite rabid in my indenting methods and my unique commenting style. Comments can often cause rendering errors in IE if they are put between sibling elements (typically when floats are involved) - putting the comment before the closing tag lets you have comments without that little hard to understand bug poking it’s ugly head out, while making the code clearer.

I have time after I go out yard sale bargain hunting, I’ll belt out the CSS and images I’d use for that as well as full documentation on the choices I made so that you can learn from it. (I do these from time to time for people I think show promise). I’ll even toss hover states on your tabs for you.

Still for someone just starting out (or at least that’s what I’m inferring from your first sentence), it’s refreshing to see separation of presentation from content and all the tags closed properly. Puts you one-up on two-thirds the people out there vomiting up code right now. (that or I’ve been spending too much time at Digital Point)

The more I hear about that book, the more like trash it sounds. (no offense guys, but damn) - this is like the fourth or fifth post I’ve seen of people using techniques “from that book” that frankly, I consider not even deployable real world…

Back from my little excursion, I’ll belt out how I’d approach that now.

Nice work, DS. My only criticisms (mild at that) would be these:

Firstly, I would perhaps make the h1Logo.png wider (adding black to the right), and set width and height on the h1 itself (matching the width and height of the image), along with overflow: hidden. I know that’s not ideal if images are off and text is resized; but I much more often resize text in my browser than turn off images. As it stands, when I bump up the text size, the h1 spills out from underneath the span image.

Only other thing I would do differently is the main menu. I like the technique you’ve used, but again, I prefer the height to expand if I resize text. It’s not too hard to modify this setup to make that work.

Maybe most people are not interested in text resizing (I don’t know the stats on that); but usually, if I spend any significant time reading a web page, I will always bump up the text size quite a bit, as I hate all the small print on the web. A truly flexible design will allow for big-scale text resizing.

My 2c.

… and here we go. This is mostly stock code for me in terms of the CSS as all I really had to do was switch out the font faces and play around with the paddings a bit.

http://www.cutcodedown.com/for_others/rockarena/template.html

As with all my examples the directory:
http://www.cutcodedown.com/for_others/rockarena

Is unlocked for easy access to the bits and pieces. Valid XHTML 1.0 Strict, Valid CSS 2.1, tested working 100% in IE 5.5, 6, 7 & 8, Opera 9.6 and 10.53, FF 2 and 3.6, and the latest flavors each of Safari and Chrome - including a mix of handheld font (72dpi), ‘standard/small’ 96 dpi and of course the 120dpi/large fonts I run native. I’m very thorough on TESTING - the browsers are free, you can run them on anything if you have a spare copy of XP lying around to install on Sun VirtualBox (also free). If you’re thinking web development SERIOUS, you’ll want to be doing that too. (and IEtester is too buggy for my tastes).

First follow along in the markup:

Strict doctype - you’ll notice I break it into two lines. I usually try to follow an old OLD [b]OLD[/]b programming convention called the 76 character rule - if a line is going to be more than 76 characters in your code, manually break it up for clarity. You’ll notice I do that on CODE but not on CDATA (like in the paragraphs).

You’ll also notice I break up most every tag that has multiple properties into multiple indented lines. This is just for clarity so at a glance I can see what attributes are declared instead of trying to scan through one long continuous line that may or may not wrap. I’m not saying you should or have to format this way, it’s just a gentle suggestion for keeping it clean and clear.

In the HTML tag I declare the language encoding. I ALWAYS start out with this baseline in the markup since the final version should have all this stuff anyways. Same goes for the Content-Language meta. It seems silly to have to specify the language so many times, but between the WCAG and the XHTML spec - they say to do all of them… I do it.

The CSS LINK you’ll see I have called the CSS file ‘screen.css’ and added the MEDIA attribute to it. It’s a good idea when you have complex layouts to NOT send the screen formatting to the printer… Mind you many (but not all) browsers override the ALL stylesheet anyways and ignore print.css, but for those who have it; use it. I left in the examples for including print and handheld but commented them out. Employ at your liesure. Usually my print.CSS declares all the font sizes in pt, sets my page wrapper to 7.5"/90pt wide (half inch off a standard 8.5"), hide things the user doesn’t need printed like the menu, and show a plain text or inverse monochrome line-art of the header. How you want to handle it is your call, I just always have this in my default starting template.

Moving down you’ll notice I stuff </head><body> and </body></html> together on single lines. This is because no content should ever go in-between these in the first place, so I like to remind myself and others of that. (especially given how often I’ve seen people mangle code I gave them by doing so!)

I renamed “wrapper” to “pageWrapper” since it’s wrapping the whole page. I often have a whole bunch of different wrappers like contentWrapper on fluid/semifluid layouts, or borderFirstWrapper / borderSecondWrapper on my image based borders… Verbosity is NEVER a bad thing in coding.

You’ll see in the H1 I put the “De Kelle” part in a SMALL tag. This is a presentational hook so that images off we can try to position and color the text to at least RESEMBLE the logo image. Have a look at the page using the web developer toolbar for FF or in Opera with view > images > no images, and see what I mean.

The empty span is there for our image to go into which will hide said text images on.

On the menu I call it mainMenu - I like full meaningful descriptions and to me the ‘nav’ most people use is just a little vague, as is the word ‘navigation’ - EVERY link on a page is navigation.

I added a .current class to the first LI, you’ll want to move that depending on what page you are on. You can either do the ‘nested class’ approach to that - which I dislike because it’s so much CSS, or the way I do it with the class using server side scripting like PHP or ASP.

The nested spans are there to draw the right side of our rounded tab corners.

I named the wrapping div #fauxColumns since you cannot rely on borders between floats to draw the full height. That thin line I end up using an image to pull off… It’s not pretty, but it works. We’ll also be using it to float-wrap so when/if you add a footer it will actually appear AFTER the columns.

Since you went content first and fixed width, I didn’t get too complex on the column code and pretty much kept what you had, simply renaming them to something a bit more meaningful. I usually avoid saying ‘left’ and ‘right’ in my code becuase in some future reskin or if I end up deploying in a RTL language those could end up switched. Right and Left are appearance, and appearance doesn’t belong in the markup - even as classnames.

From there it’s just closing out all the div.

I’m gonna break now, don’t remember how big sitepoint’s post limit is - I’ll write up the CSS explanation next which is where the real magic happens.

You’re welcome!

I didn’t quite mean that. If you just write plain HTML, with no CSS, it will appear differently in each browser, since each browser has a bunch of default margins, paddings and other stuff that it applies to elements.

So it’s important, when building a website, to explicitly set margins and paddings on all elements, so that you don’t get nasty surprises when viewing your pages in various browsers. This is a cause of lots of confusion out there. One common method for resetting browser defaults is to use a “CSS reset”, which kills all browser defaults in one hit. There are arguments for and against using resets, but a basic one is to put this at the start of your stylesheet:

html, body, div,
h1, h2, h3, h4, h5, h6, p, a, blockquote, pre, code, hr, img,
form, fieldset, legend, label, textarea, 
span, em, strong, sub, sup, cite,
table, tbody, td, tfoot, th, thead, tr, tt,
dl, dt, dd, ol, ul, li {
    margin: 0;
    padding: 0;
}

img {
    border: 0;
}


JASC Paint shop Pro 7.

Yes, I realize Corel Paint Shop Pro is up to X3 now, but frankly it’s as much of a fat bloated pig as photoshop so I don’t even want it on my computer. I’ve been using version 7 since it was released, and had no real motivation to use the newer versions since it does everything I need done.

It’s simple, lean, fast and still has the best save-time image optimizer I’ve ever seen in a paint program.

I used to go to photoshop for the handful of things PSP7 couldn’t do - now I just don’t do those things.

The gap under the header is caused by the default (browser generated) margins on the UL.

So change

margin-left: 10px;

to

margin: 0 0 0 10px;

E.g.

#navbar ul{
	list-style:none;
	[COLOR="Red"]margin: 0 0 0 10px;[/COLOR]
	padding: 0 0 0 0;
}

The only other thing I would do is add a bit of right padding to the links

#navbar a{
	float: left;
	display: block;
	background: url(images/tabright.jpg) no-repeat right top;
	padding: 0.5em [COLOR="Red"]0.5em[/COLOR] 0.5em 0;
	text-decoration:none;
	color: #805b1e;
	height: 35px;	
}

The final change you should make is to greatly increase the width of tableft.jpg, say bumping it up to 100px at least. This will ensure that if someone resizes the page they won’t get an ugly black gap in the middle of the tab (which you get when you add the padding I suggested).