I'm trying to figure out how to make a set of 3 frames where the middle one is locked at a specific pixel width and the side columns can stretch to fill the rest of the browser. Right now I have it as something like this:
<frameset cols="20%,60%,20%" frameborder="0" border="0" framespacing="0">
<frame src="background.html">
<frame src="scripts.html" name="middlep">
<frame src="background.html">
</frameset>
This is obviously wrong, but am not sure how to go about it. Any html gurus out their can help?
Replies
Are you just trying to get a centered column? Could you show us a PS mockup or something, because it sounds like there's a way easier solution.
First pic is of the template, second of how I figure it'll have to be sectioned. The checker pattern needs to be able to encompass any area that isnt taken by the brown area (hence scalable frames). the brown area isnt a repeating pattern obviously so it needs to be seperate. I could have it as a table but I want it to go all the way from the top of the window to the bottom, and for tables I can only get them to be 24pixels away from the top or bottom by percentage. the black area would be a 4th frame sense it needs to be able to expand when the + boxes are checked for additional info via javascript page expansion. the name and links at the top would be in a 2 column table.
Going with a table for the brown area would make the most sense but again I cant seem to get that to stretch to the top/bottom fully, hence why I'm looking at frames instead.
CSS layout is definitely the way to go. I put together a super simple example, that should get you started. Get it here.
For the full CSS reference look here:
http://www.w3schools.com/css/css_reference.asp
I highly recommend to download and use the Firefox Add On "Web Developer"
http://chrispederick.com/work/web-developer/
For the images I would do this:
checkerboard image with X/Y tile, make the image about 200x200 pixels or something (fairly small filesize, and not so much tiling/redraw) and if its just 2 colours, *.png
the brown/yellow would be easiest with a 1000x25px tiled Y.
Some DIVs and CSS is your best bet (divs are pretty much like table cells, except that you can arrange them however you like and have far more control over them).
Giving the central content div the CSS value of overflow: scroll; will give the same scrollbar effect as you get with that central frame, should the content overrun the height of it.
CSS makes things MUCH faster.
According to Google Analytics, only 2.8% of the visitors to my folio use IE6 (which is the main offender when it comes to adhering to CSS standards) and I imagine that's probably fairly representative of most game art portfolios.
So, if it's a lot of effort to work around that, you could probably ignore that demographic without too much repercussion...
Even if your CSS/HTML is fully W3C validated, you may still find quirks between different browsers (eg. defaults not being overriden, different initialisation of CSS values) that can make your site appear messed up in one or more browsers.
Chrome uses webkit so it's a fairly decent test for Opera compatibility too, if you don't want to install Opera as well