CSS issue with embedded form

33 views
Skip to first unread message

Joe

unread,
Aug 13, 2014, 11:30:27 PM8/13/14
to web...@googlegroups.com
I am just learning web2py and I love it!!!

I am experimenting with it so I can learn it.

THE QUESTION: I use my own HTML and CSS. I embedded a form in the HTML like so" <h2>{{=form}}</h2>

The form is displayed fine and works perfectly, however, it just floath left no matter what I do in the page. I placed the {{=form}} in the HTML inside a class which is controlled by my CSS, but my CSS controls everything on that class except the position of the form. The form's text is fine, but the position is not.
I kind of want this form in the middle.


Cliff Kachinske

unread,
Aug 14, 2014, 3:33:02 PM8/14/14
to web...@googlegroups.com
That's kind of an inappropriate use of the h2 tag for starters. Why not put it inside a <div class="fake-h2"></div> tag set and style fake-h2 however you like.

Joe

unread,
Aug 14, 2014, 8:45:50 PM8/14/14
to web...@googlegroups.com
Thank for the reply. The h2 tags are inside an existing class so  they should react like all the other h2 tags in that class and they do to some extend as far as color and size but not the position.

In any case, I created a new div for the form and added a margin to push it to the middle but this is not an optimal solution.

BTW: it seems the Field text area in the form really not responsive. Not adjusting the size properly as it should to the responsive css in a smaller screen size. I should probably post this in a separate question.
Reply all
Reply to author
Forward
0 new messages