i have had a few problems with DIVS over the last 4/5 years and have never actually figured out a ways round it even with using CSS
99% of the time i create my sites using pixel based measuring system other the % based equivalent, now whenever a user resizes the window or whatever then the layer is screwed up all over the screen
im not too bothered about this problem but it would be worth knowing the answer too (note: my HTML teacher 4 years ago said it couldnt be done, so i would also like to prove him wrong )
i dont know what your question suppose to be but it is much better to use a "%" over a pixel based factor reason being because 25% on any sceen size will always put the div tag 25% in relation to the object where as 25px will be 25px from the screen it self....it think
malcolmboston wrote:i have had a few problems with DIVS over the last 4/5 years and have never actually figured out a ways round it even with using CSS
99% of the time i create my sites using pixel based measuring system other the % based equivalent, now whenever a user resizes the window or whatever then the layer is screwed up all over the screen
im not too bothered about this problem but it would be worth knowing the answer too (note: my HTML teacher 4 years ago said it couldnt be done, so i would also like to prove him wrong )
It's unclear from your description what you are using (pixel based, or %), what the results are based on that (screwed up, or not), and what you want to have happen.
Please, explain more clearly (perhaps some simple example code?), and I'll be happy to try to help.
Yeah, you're not really being clear here about what your actual question is. any element can be assigned a size in % or fixed width, if that's your question... so that's not your problem. a liquid layout is a bit harder to achieve, but i can't think of any technical reason it can't be done.
Liquid layouts are a bit tougher to grasp at first, but in many cases are worth it (not always). If you want to use absolute values for your elements, using divs and CSS is a piece of cake. Do you have a sample site so we can try to show you what to change?
The problem you are facing is margins. Specify the margins to hold the box in a fixed position relative to say the top of the browser. The margins hold the edges in place while the box itself expands.
If you have to look at an example, just check my home page out.
<div id="container">
<div id="example">text or stuff goes here</div>
</div>
This will keep the document flow while allowing a strecting DIV. If done properly, it will be multi browser compatible.
other absolute containers can be placed inside the top level container for menus and such. These absolute containers will not affect the relative position of the example container.
Keep in mind for this to look 99% the same in various browsers, you must workin some of the quirks each browser may have.
Mozilla and I.E. see things like padding and borders a wee different. Puting specified pixel boxes inside boxes often compenstates for the failures in I.E. (I.E. is not as W3C compliant as say Mozilla Firebird.