
@Kyalo, @Jonas. Thnks for the feedback. Here is a simpler one that needs no server side language, however CSS will not treat it correctly. <div id="headertext"><h1> The quick brown fox jumped over the lazy dog</h1></div> In my stylesheet #headertext, the Div tag has a size of say 400px with float:left; margin: auto; So I need the text of the header text to be in the centre of the div tag, without it treating the whitespace as a break or space. If I use a table/cell layout, am done in seconds..... Any suggestions? Rgds. On Sat, Dec 11, 2010 at 8:58 PM, Ndungi Kyalo <ndungi@gmail.com> wrote:
I think what aki means by "not purely html" is a situation where you have to generate html code from a server-side language .. something like `echo "<div class='left-pane'>content</div>"`. The simple answer is that you dont actually have to and that in fact you should never ever (eeever!). The long answer is to use an mvc pattern or framework. You see an MVC pattern will allow you to write your html layouts/templates kando and then write php or asp or .net logic code without having to even care about a tag. This translates to being able to create different "views" for different browsers or clients while leveraging on the same server side code. Whereas it takes a bit of learning, if you are in this for good then its worth it: both for your street cred, speed of dev and for maintenance balaaz.
My advise : if you are in webdev for the long haul then relax - get to fall in love with XHTML and CSS and maybe mvc if you like. They may seem uptight and unyielding at first but in the end you will be glad you made their acquaintance ;-). If you were just "passing-by" - as in you just want sort out some specific problem and move on to other non-web stuff - then by all means, scratch your itch. In Kao we say that you kill a snake with the closest weapon, not the best one.