|
| |
|
|
DaveX
Posts: 230 Joined: 5/4/2004 Status: offline
|
Container question - 8/7/2008 0:34:38
Playing around tonight I ran into a small issue or maybe it's big. I thought I had created a container that is 900px wide. Everything was lining up ok in HTML Tools preview but when I looked at it in a browser everything was off. If I stretched the browser elements would move along with it. What I'm wondering is how to make everything I position relative to the container I made rather than the browser size. Being a rookie I thought that putting everything within the div of the container that it would stay inside the container...
|
|
|
|
TexasWebDevelopers
Posts: 722 Joined: 2/22/2002 From: Dallas, TX Status: offline
|
RE: Container question - 8/7/2008 2:27:42
Make sure the inner elements are inside the container div. Establish the container as positioned relatively. Establish the divs inside the container as positioned absolutely. Here is a quick example of css absolute positioning relative to main content div: http://www.texaswebdevelopers.com/examples/frontpagewebmaster/container_question.asp View source and copy code for example.
|
|
|
|
TexasWebDevelopers
Posts: 722 Joined: 2/22/2002 From: Dallas, TX Status: offline
|
RE: Container question - 8/7/2008 9:48:31
Hi Jaybee, I know that...it actually took me a while to do it and not create other issues. However, when someone asks for a solution it is often nice to help them solve their primary problem (even if not the perfect solution) while pointing them in the correct direction. You wouldn't give the advice to a user who's site is built in tables to switch to a CSS layout because he is having page centering issues. Since FP slaps absolutely positioned layers around as stanard operating procedure it's often easier to make lemonade out of those lemons...
|
|
|
|
DaveX
Posts: 230 Joined: 5/4/2004 Status: offline
|
RE: Container question - 8/7/2008 18:15:08
I'm not sure i understand the comment about not having to position elements. wouldn't that just result in all elements stacked one over the other and over to the left?
|
|
|
|
TexasWebDevelopers
Posts: 722 Joined: 2/22/2002 From: Dallas, TX Status: offline
|
RE: Container question - 8/7/2008 20:28:11
It takes some planning but you create a layout that works for you. For example, header, footer, three columns, elastic width (different from liquid or fixed widths as it uses ems and works when font sizes are re-sized). Take the example I gave you and delete the little absolutely positioned box and you can see a header, footer, two column layout that works without absolute or relative positioning. You float columns to the left and right. Clear the float for items like footers. Use margins to adjust horizontal and vertical elements. Use padding to keep text off of the div edges, and so on.
|
|
|
|
skip
Posts: 177 Joined: 12/9/2001 From: Missouri USA Status: offline
|
RE: Container question - 8/13/2008 23:00:03
Jaybee - I have been looking at layout info and came across this http://blog.html.it/layoutgala/ in a post by Nicole. For study purposes, do any of these sites show good liquid layout similar to your site.
_____________________________
skip
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|