Topic: Another quickie - how to make CSS containers push others around. |
|
---|---|
Author | Thread |
Nervous Wreck (II) Inmate From: |
posted 07-09-2006 18:49
Hi guys, I have another quick question. |
Paranoid (IV) Inmate From: Florida |
posted 07-09-2006 19:54
Don't think I'm really following you, but maybe adding this: code: #news p { position: relative; z-index: 1; } #newsbottom { margin-top: -150px !important; } |
Bipolar (III) Inmate From: |
posted 07-09-2006 20:01
I'm actually referring to the column on the right. If you load it again you'll see what I mean (changed the file.) |
Paranoid (IV) Inmate From: Florida |
posted 07-09-2006 20:14
code: #headfeatures, #headaffiliates, #headwatch { position: static !important; } #sidebarcontent br { display: none; } #sidebarcontent p { margin: 0; } |
Bipolar (III) Inmate From: |
posted 07-09-2006 20:14
Ok if you reload that link now you'll see what I mean. If the feature images were just sitting in the parent div, they'd push down the "affiliates" header in that parent div. However, when they are in a separate container they "understack". I know I could just drop the PHP include right into the parent div and solve the problem, but I'm looking for a way (for future reference) to make DIV containers block each other around. |
Bipolar (III) Inmate From: |
posted 07-09-2006 20:21
Thank you! I knew it was some simple piece of code again. Now I know for future ref. Thanks! |
Bipolar (III) Inmate From: |
posted 07-09-2006 20:30
Just as a quick follow-up question - I applied the margin:0px; to #sidebarcontent but IE is still giving it a slight margin. How do I work around this (minus setting a negative margin, b/c then Firefox wouldn't display it correctly, since it, by default, has no margin.) I'm sorry if these questions seem really basic and redundant but I'm just starting to learn. Thanks! |
Bipolar (III) Inmate From: |
posted 07-09-2006 21:11
Also, is it possible to set a Z-index on an absolutely-positioned container so that it will appear BELOW a static container in the same parent DIV? (Or is it possible to set an absolutely-positioned container BELOW its parent container using z-index?) |
Paranoid (IV) Inmate From: Florida |
posted 07-10-2006 02:51
You can't place a child below its parent (except for that one thing, don't ask), but you can place one child over another. Just take 30 seconds and try it. |
Bipolar (III) Inmate From: |
posted 07-10-2006 04:30
Ok well I did try it before I posted, but I couldn't get the one static child to stack underneath the other. It was only working when they were positioned absolutely. So I still can get it to work with two static containers. On another note, I found the problem with that margin thing, again some stupid excess syntax. I guess taking a break from the work and coming back to it is a pretty effective method of solving my own problems |
Paranoid (IV) Inmate From: Florida |
posted 07-10-2006 05:15
Ah, well you do need to set a position value other than static, but it need not be absolute - relative will do, and without the annoying side-effects. |