Hi Janine,
I have now finished all of your courses on the Kelby training site. Loved them all. I hope you don’t mind me asking you a quick question? I think its the sort of question that an expert like you has to answer; I cannot find it in the FAQs.
When creating divs in a brand new page that will contain various content, such as headers, footers and images, etc., is it a good or bad idea to create them with absolute positioning? I discovered this by accident and it seems that by using it I can create lots of divs and then drag and resize them into any position I want on my page. This seems to be a lot easier than using float left and clearfloat, etc. Am I doing the wrong thing? Will it cause me problems later?
Many thanks,
Tony
Hi Tony,
Thanks for watching my videos. You ask an excellent question, and I completely understand why using divs with absolute positioning seems like such a great option, but there are a number of problems with absolute positioning on the web.
AP Divs, as the name implies, are <divtags that include styling information that adds absolute positioning. That means when you place an AP Div in a Web page, it stays where you put it, no matter how big the user’s browser window is. This may seem like a good idea at first, and AP Divs were popular among some designers for a while because they are so easy to use and so similar to many of the features in desktop publishing programs (such as Adobe InDesign and Photoshop). But the inflexible layouts created by AP Divs don’t adapt well to the changing environment of the Web, where different-sized monitors and other display variations can lead to cut-off text and other undesirable results in AP Div-based designs.
For example, you can’t center a design created with AP Divs, and depending on how you set them up, if the content in the div exceeds the size of the AP Div, it can get cut off or overlap in undesirable ways. Some designers use AP Divs on occasion to add immovable elements, such as a logo anchored to the top left of a page. They are also used with JavaScript for advanced features such as drop-down menus, but creating an entire page design with AP Divs is not recommended.
I hope that helps, and I wish you all the best with your Web site,
Janine