|
|||||||
| CSS Discussion and technical support relating to Cascading Style Sheets. |
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to place a single div in the middle of another
Hello,I need to place a div that will contain an IFRAME with ads (#2 in the illustration) , in the middle of a div that will contain the article's text (#1 in the illustration).
the illustration In the illustration you can see that div #2 is supposed to be somewhere in the middle of div#1, and that text from div#1 should wrap in on 3 sides.I used float:right and the margin-top property on div#2 to place it where I want, and clear:both on div #1. but the text in div#1 only wraped div#2 from below, not from above. What am I missing? |
|
#2
|
||||
|
||||
|
Just put the <iframe> in the middle of the content, between paragraphs or something, then float it right.
__________________
Every fight is a food fight when you’re a cannibal. |
|
#3
|
|||
|
|||
|
I rather not, since the content is not in my control
I have over 1500 articles, and I can't go and place the IFRAME in the middle of each one.
I rather find a solution that will be indipendent of the content. Thank you anyway
|
|
#4
|
||||
|
||||
|
I don't think there's any way to do a pull-out without touching your content.
__________________
Help Save Ana Why use Web Standards: Zeldman How (new): Castro How (experienced): Cederholm If you can only get one book and you're already HTML savvy then this is it: stylin' with CSS: A Designer's Guide Charles Wyke-Smith New Riders "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan |
|
#5
|
|||
|
|||
|
Thank you.
|
|
#6
|
||||
|
||||
|
Last night I had a think about how to do a column pull-out without putting the pull-out inside the block of text.
And after a while of running possible scenarios through my head, I thought of a way that could potentially work. So I made an example page to test out the theory. It worked perfectly and it allows you to specify exactly how far down you want the pull-out to be in whatever unit you want. I tested in Firefox, Opera and oh, IE. Never mind. I tried lots of different ways to get IE to co-operate, but nothing worked, and I've spent most of today thinking about how to get it to play along, but I can't come up with anything. So I've uploaded what I have so far in the hope that maybe someone else can get IE to play along.
__________________
Every fight is a food fight when you’re a cannibal. |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|