Compound Theory

v2.0

Categories

  1. Transfer
  2. ColdFusion
  3. JRuby
  4. Java
  5. ColdSpring
  6. Squabble
  7. JavaLoader
  8. ColdDoc
  9. 2ddu
  10. AsyncHTTP
  11. OO Analysis and Design
  12. Flex
  13. Railo
  14. XML / XSL
  15. Hibernate
  16. ColdFusion Builder
  17. Fall
  18. Ubuntu
  19. XHTML / CSS
  20. Eclipse
  21. Git
  22. Oracle Database
  23. Usability / UI Design
  24. webDU
  25. cf.Objective()
  26. LWJGL
  27. cf.Objective(ANZ)
  28. Captcha
  29. MAX
  30. Melbourne CFUG
  31. Martial Arts
  32. Random Things
  33. Conduit

Recent Posts

Projects

Recent Comments

29 June 2004 04:09 PM

XHTML and 3 Column Layout

For a while now the CSS markup on Compound Theory has caused some interesting display bugs to occur on IE, and particularly on Mac IE.

I've redone the whole CSS structure, and I think this is a much better (less bugs?) way than the previous.

The originial incarnation was based on the principle of floating one nav bar on the left, one nav bar on the right, and keeping a middle section for the content.

E.g.

div.left {
    float: left;
    width: 200px;
}

div.right {
    float: right;
    width: 200px;
}

div.middle {
    margin-left: 210px;
    margin-right: 210px;
}

However, apon shrinking the size of the browser window, often the middle section would drop below the left, or really wide content would shift the middle section down the page.

I tried everything known to mankind to stop it from shifting down, to no avail.

Finally my friend Adrian shot me over to www.glish.com and I discovered a xhtml layout that used absolute positioning for the outer columns.

Simply put:

div.left {
    position: absolute;
    left: 5px;
    top: 50px;
    width: 200px;
}

div.right {
    position: absolute;
    right: 5px;
    top: 50px;
    width: 200px;
}

The full details can be found here, however by using absolute positioning to line up both of the left and right columns for my nav bars, the issues inherent with using a float no longer applied.

Definatley the way to go.

Now I still need to sort out the form display issue on a Mac...



Comments

Posted by Adrian on 02 July 2004 01:00 PM

Good stuff - glad it all worked out. (Told you - Glish rocks!)

Add Comment