Howdy, new to the forum,
I have a question or 2 regarding the structuring/layout of a design using CSS.
I suppose the first thing that comes to my mind is when do you decide to use relative and absolute positioning and when do you decide to use floats when laying out your design?
Would I be right in saying:
If using position: to layout a page/design, it is best to create a container div which is set to position:relative, allowing header, content and nav divs inside the container div to be set to position:absolute, allowing these divs to be positioned relative to the container div. This makes sense to me allowing each div element to be positioned within the container.
If using floats to layout a page, do the divs automatically center on the page? also would it be advisable to use a container div when using floats. Floats do seem a bit more vague, would I be right in thinking you must use margins and borders to control spacing between float elements?
I suppose basically what I want to know is what in your opinion is the better method of laying out a page or if you use both when would you use the different methods?
Cheers
C
I have a question or 2 regarding the structuring/layout of a design using CSS.
I suppose the first thing that comes to my mind is when do you decide to use relative and absolute positioning and when do you decide to use floats when laying out your design?
Would I be right in saying:
If using position: to layout a page/design, it is best to create a container div which is set to position:relative, allowing header, content and nav divs inside the container div to be set to position:absolute, allowing these divs to be positioned relative to the container div. This makes sense to me allowing each div element to be positioned within the container.
If using floats to layout a page, do the divs automatically center on the page? also would it be advisable to use a container div when using floats. Floats do seem a bit more vague, would I be right in thinking you must use margins and borders to control spacing between float elements?
I suppose basically what I want to know is what in your opinion is the better method of laying out a page or if you use both when would you use the different methods?
Cheers
C