Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Jun 2007
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Problem: text not wrapping around absolutely positioned div

    Hi,

    I've got an issue where some text in a larger div is not wrapping around a smaller div. It appears instead to be continuing behind the smaller div.
    http://www.tcadp.org/cmsms/index.php?page=austin

    This smaller div has been giving me fits. Everything I have done so far has been intended to get the smaller div to appear where I want it, but in the process, I seem to have created this wrap problem. I am pretty sure it has something to do with the smaller div being absolutely positioned, and thus "removed from the document flow." (she swallowed the spider to catch the fly...)

    Anyone have any ideas?

    Relevant css:

    Code:
    .maintext  /*this is my larger, containing div.  I left the last thing in, the word-wrap, but it doesn't do the job.*/
    
    	{
    	
    margin: 1em;
    	font-size: .75em;	
    position: relative;
    min-height: 450px;
    word-wrap: break-word;
    	}	
    
    #chapter_info, #chapter_info a  /*this is my smaller div, the green one to the right in my linked page*/
    
    {
    margin-left:1em;
    padding: .8em;
    background-color: #A9C4A6;
    color: #112233;
    border: 3px ridge #112233;
    font-size: .8em;
    position: absolute;
    top: 1em;
    right: .25em;
    
    }
    I appreciate any advice. Thanks!

  • #2
    Regular Coder
    Join Date
    Feb 2007
    Location
    Canada
    Posts
    924
    Thanks
    10
    Thanked 56 Times in 55 Posts
    Yes, float:right will do that, however, that section of code needs to appear in the source code before the text which begins with "All are Welcome".
    The text should be contained in a div, too.

    That should have the small div on the right and the text floating around it okay.

    *edit*
    Code:
    #chapter_info, #chapter_info a
    
    {
    margin-left:1em;
    padding: .8em;
    background-color: #A9C4A6;
    color: #112233;
    border: 3px ridge #112233;
    font-size: .8em;
    float:right;
    clear:right;
    top: 1em;
    right: .25em;
    display: block;
    }
    add a clear:right, too

    4 stylesheets? What's with that?
    Last edited by jlhaslip; 10-29-2007 at 01:11 AM.

  • Users who have thanked jlhaslip for this post:

    mranster (10-29-2007)

  • #3
    New Coder
    Join Date
    Jun 2007
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Content management system (CMSMadeSimple). A bajillion little pieces all stuck together with php and duct tape. This is my first site using it.

    Thank you for your reply. i'll give it a try tomorrow.

  • #4
    New Coder
    Join Date
    Jun 2007
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thankyou!! My hero/heroine/whomever.
    http://www.tcadp.org/cmsms/index.php?page=austin

  • #5
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,637
    Thanks
    6
    Thanked 1,004 Times in 977 Posts
    I’m using CMSmadesimple as well and know how flexible it is.
    The four stylesheets are actually one for handheld devices, one for all devices, one for computer screens, and one coming from the Album module where you can have different kinds of photo galleries (i.e. lightbox, thickbox, standard preview etc.), and these are all the styles for those templates, so no need to worry about that.

    Nice to see more people use it.
    Last edited by VIPStephan; 10-29-2007 at 05:55 PM.

  • #6
    Regular Coder
    Join Date
    Feb 2007
    Location
    Canada
    Posts
    924
    Thanks
    10
    Thanked 56 Times in 55 Posts
    The 4 css files made it difficult to search and destroy the elements I was looking for, is all... Of course, they were in the last one ... Murphy's Law and all that

  • #7
    New Coder
    Join Date
    Jun 2007
    Posts
    21
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Pretty pages, Stephan!

    I'm still twiddling with my divs (doesn't that sound charming?) I'm still at the stage where every site I seem to have to relearn everything all over again--I should really take on lots more contracts.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •