Thanks a lot for the comprehensive answer. > CSS absolutely *can* control positioning, but it should be used with the right html layout.
I think here is the core of my problem: I know how to position items on a static web page using CCS ... > Ideally, you shouldn't use a <table> unless its, um, a table. ... but referring to the very stripped down example I posted initially, I just don't understand what causes the buttons to be wrapped into a table, which from my very limited understanding does prevent the positioning through CCS!? I downloaded your example and let it run, but there are much too much loose ends for me to be able to match the code to what I see going on on that web page. Could I be right that web.py is just the wrong tool (documentation-wise) for an absolute beginner like me to start learning web-programming? Cheers, Chris Am Freitag, 24. Januar 2014 15:36:49 UTC+1 schrieb NSC: > > CSS absolutely *can* control positioning, but it should be used with the > right html layout. Ideally, you shouldn't use a <table> unless its, um, a > table. If you wanna brute force this, look at the css "position" property. > However, I don't recommend this, it's better to lay your page out using > divs and spans, then use the css to "tweak" the layout, not force it. > > Regarding your attempt to build a form inside your python code, you'll hit > limitations all along the road. If you're trying to use the "right tool > for the right job", then building a web page in python code is often > confusing, usually extra work, and limited in its capability. > > Opinions vary on this, but I choose to implement all my code as > simplistically as possible. Using the templates in web.py is useful in > some cases, but for complex web pages where you have full control I do the > following: > > - web.py is my "server". I attempt to limit code here to those things > that can *only* be done in python. > - web.py is by definition a web server. So, if I want an html page, I > serve up an html page from the /static directory. Same with .js and .css. > - browsers are powerful javascript interpreters, so I use javascript, > ajax and css to build my user "experience". Pushing a lot of work out to > the browsers is "distributed computing" - your server isn't doing work > that > could be done on a client. > > So, the general rules: > > - servers '*obtain and deliver', or 'accept and utilize' data* > - html pages *define *the basic layout > - css *refines* the layout stylistically, and > - javascript obtains data from the server, *injects it* into the > html, and *empowers* the user experience. > > That's my opinion, and pretty much the principles of "web 2.0". Your > mileage may vary. > > It's a year old, but I made an attempt at a (basic) example of this > concept. I hope at the very least this helps you solidify your design > decisions, regardless of which way you choose to go. > > https://github.com/shannoncruey/webpy-jquery-sampleapp > > Hope this helps! > S > > > On Fri, Jan 24, 2014 at 1:13 AM, Christof Warlich > <[email protected]<javascript:> > > wrote: > >> Am Freitag, 24. Januar 2014 06:50:35 UTC+1 schrieb Chang.Jian: >> >>> learn some css. >>> these things you talk about is controlled by css. >>> http://www.w3schools.com/css/ >>> >> >> I tried doing it with CCS initially, but while I could change things like >> the pages background, I couldn't change the arrangement of the buttons. >> After looking at the generated HTML code, this seems to be no surprise, as >> the buttons are rendered into a one column table _hardcoded_. Thus, I doubt >> that CCS could solve my problem. >> >> But I'd be more that happy for an example proving me wrong. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "web.py" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] <javascript:> >> . >> Visit this group at http://groups.google.com/group/webpy. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- You received this message because you are subscribed to the Google Groups "web.py" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/webpy. For more options, visit https://groups.google.com/groups/opt_out.
