Python is strongly typed language as you may already know. Wikipedia explains that here. Because of that you can check easily object types in Python this way: l=['one','two'] type(l) type 'list' print l.__class__ type 'list' When you need to check you can do it in this pythonic way: l= if type(l).__name__== 'list': print 'Is a list!' else: print 'Not a list' … [Read more...] about How to get python object type?
In the very last article of this tutorial I will give you the minimal 2 column website layout achieved via CSS. Here div C represents the container. Divs H represents the header, div A represents the main content area, div B is the sidebar div, and the div F is the footer. We used all the tips from the tutorial here. First we used overflow: auto; in the container … [Read more...] about Minimal 2-columns website layout
Tutorial "CSS website design using divs" continues. Let me introduce you now with Mr. Offset. He is a man with 5 balloons. Ups, but looks like 2 balloons are running away. What this basically mean — is that CSS left, right, top & bottom offsets for the div elements should be used only with: absolute, relative and fixed positioning. Offsets won't work for … [Read more...] about Understanding offsets
In this tutorial so far I've tried not to use "spaghetti markup" code which looks like this: <div id="A">A text<div id="B">B text</div></div>, or <div id="A"><div id="B">B text</div>A text</div> But sometimes you need to use it to achieve the journal layouts: <html> … [Read more...] about Journal style for the divs
Floating divs is what we will examine today. As the Tutorial: "CSS website design using divs" continues we are progressing more and more. Divs are block level elements — meaning — each div will always start in a new line. But sometimes this is not desired. Let's make one simple web site with 2 column layout, header, and footer. <html> <head> <style … [Read more...] about Floating divs