Log In:Register.
Div/CSS layouts: part two
One may ask, "How far can you take a div based layout?" I can answer that by saying that I took this whole site, and with the exception of a few tables, recreated the same exact look out of divs. "Why not all the tables," you may ask. Well to be honest, tables are not to be taken out of the HTML specification, and they are still quite useful. I just found when I looked over my code, that I was nesting plenty of tables, using TD's to create stylized lines (ie: the line to the left). I think this is unexceptable (for me that is). So I think I have come to a good solution for div/css layouts, and though I don't completely like how limited I am, I can see why somethings are the way they are.

One of the first things I've learned recently is how 'absolute' positioned elements react in their enviroment. Now, if you read the W3C recomendations, it says that an 'absolute' positioned element is positioned in reference to it's container. No where, and I mean NOWHERE, does it say that the container cannot also be positioned 'absolute'. However when doing my tests, in both FireFox and Internet Explorer, they both seem to move up the tree to find a container that is not positioned 'absolute' to reference the new coordinates for (in fact, they look for the first container that has the 'position' attribute set to 'relative' or to the top container, whichever it finds first). This can be quite confusing. Especially since I did it by accident. Upon changing the position attribute on my footer, it was acting differenty all of a sudden. I can only hope that the developers of these two products can fix this, but from what I've gathered (from both reporting bugs and just reading on the internet), they all seem to think that this is the correct translation of the recomendation. If you agree with me, then let your vioce be heard and let the developers know. I have.

As well as figuring out how to 'position' elements, I also found a good genereal layout, that at least for me, allows me to drastically change the look with only my css file. This was after all my original intention. I hope to soon write a version that would allow you to basically 'skin' a site using nothing but css. This would of course add a lot of probably useless divs into the code so that you could support more graphically enhanced sites, but sometimes you have to give a litte for a better product.

I'm sure you're thinking 'Why?'. And I have a good answer for you. I maintain 4 sites using MeiliBoxOOP and all use my XSL/XSLT transformations. So, if I could create a generic skeleton and only have to change the css file for the different looks, then life would be so much easier on me. BTW, those for sites are: www.meilibox.com, www.streetmonkstudios.com, www.gas-productions.com, and www.cfmxconsulting.com. At the time of this writing, they all share the same basic look, but soon that will be changing, hence my drive to create this easier way of handling the visual look of them all.

Well, that's it for now. I know it's not that much, but I wanted to get it off my chest. I will write again with the final details when I finish it. Have a great day!

(0)Comments | < Back
Comments
Leave a Comment
Please log in to leave a comment.