www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Client-Side Development > CSS

    CSS Discussion and technical support relating to Cascading Style Sheets.

    Reply
     
    Thread Tools Rate Thread Display Modes
      #1  
    Old 04-12-2006, 12:23 AM
    mamachika mamachika is offline
    Registered User
     
    Join Date: Apr 2006
    Posts: 6
    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?
    Reply With Quote
      #2  
    Old 04-12-2006, 01:35 AM
    David Harrison's Avatar
    David Harrison David Harrison is offline
    Evil Overlord & Super Mod
     
    Join Date: Dec 2002
    Location: Manchester, UK
    Posts: 6,293
    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.
    Reply With Quote
      #3  
    Old 04-12-2006, 07:06 AM
    mamachika mamachika is offline
    Registered User
     
    Join Date: Apr 2006
    Posts: 6
    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
    Reply With Quote
      #4  
    Old 04-12-2006, 03:16 PM
    ray326's Avatar
    ray326 ray326 is offline
    Got Link?
     
    Join Date: Nov 2003
    Location: Jerryville, Tejas
    Posts: 11,741
    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
    Reply With Quote
      #5  
    Old 04-13-2006, 10:28 PM
    mamachika mamachika is offline
    Registered User
     
    Join Date: Apr 2006
    Posts: 6
    Thank you.
    Reply With Quote
      #6  
    Old 04-14-2006, 02:04 PM
    David Harrison's Avatar
    David Harrison David Harrison is offline
    Evil Overlord & Super Mod
     
    Join Date: Dec 2002
    Location: Manchester, UK
    Posts: 6,293
    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.
    Attached Files
    File Type: txt column pull-out.txt (3.6 KB, 119 views)
    __________________
    Every fight is a food fight when you’re a cannibal.
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 01:08 PM.



    Acceptable Use Policy

    Internet.com
    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.