Best way to create menus?

Caporegime
Joined
12 Mar 2004
Posts
29,962
Location
England
What technique is generally considered the best when creating menus? I've seen unordered lists used, as well as definition lists and tables.
 
Either way you'll need html guys. A menu is essentially an unordered list. So thats the tag you use. I'd say thread derailed ;)
 
Ok, unordered lists looks like the to go then, thanks guys.

What's a good way to test out how a website looks in different screen resolutions? I'm assuming there's a better way than constantly adjusting my screen resolution?
 
Design at 960px wide and forget the people with tiny monitors. They are holding back humanity ;)

You could use media queries if you want to get technical though :)


Oh and resize this ;) http://cssgrid.net/
 
Design at 960px wide and forget the people with tiny monitors. They are holding back humanity ;)

Oh I agree with you there. :D

And if I want the images in the content div to have padding but not the ones in the header, do I create two css classes for header and content images?
 
Last edited:
Thanks.

Say for example if I wanted every header to be the same, i.e. the same text and images how could I do this without having to copy and paste that html onto every page?
 
Mmm, Server Side includes. Ever used PHP?

Or CSS pseudo elements using :before and :after, never tried it myself but its possible..
 
If you have a PHP server you could store the HTML within a header.php file and within each HTML page you'd just write <?php require("header.php") ?>. Whatever is displayed within header.php will be displayed in that respective page :)
 
If you have a PHP server you could store the HTML within a header.php file and within each HTML page you'd just write <?php require("header.php") ?>. Whatever is displayed within header.php will be displayed in that respective page :)

Mmm, Server Side includes. Ever used PHP?

Or CSS pseudo elements using :before and :after, never tried it myself but its possible..


Ok. Thought it would easily be possible using front end stuff. I will leave that to later then when I put it on a server. I've used JSP before, very shallow learning curve already knowing java.

When using the include statement, do you typically put that in the header div like this,

Code:
<div class="header">
<%@ include file="header.jsp" %>
</div>

or put the div in the header file?

Actually wouldn't it be more convenient to have one template page which includes content of a certain page when that url is requested?
 
Last edited:
Either/or.

Going to talk in php as thats more my bag.

I would personally have header.php like this.

Code:
<div class="header">
Hello world
</div>

And index.php or whatever.

Code:
<!doctype html>
  <head>
  <link type="text/css" rel="stylesheet" href="style.css" />
    <title>Example document</title>
  </head>
  <body>
	<?php include 'header.php'; ?>
	<?php include 'content.php'; ?>
	<?php include 'footer.php'; ?>
  </body>
</html>

Less confusing.
 
Last edited:
erm..could I throw say Wordpress into the mix? Just write a theme, and hey presto all your headers are the same...update via mobile etc. multiple authors, seo easy, mobile easy, updates easy...just need a database and php on your server...
 
Back
Top Bottom