...

View Full Version : Problem: text not wrapping around absolutely positioned div



mranster
10-29-2007, 12:49 AM
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:



.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!

jlhaslip
10-29-2007, 12:59 AM
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*

#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?

mranster
10-29-2007, 04:27 AM
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.

mranster
10-29-2007, 05:32 PM
Thankyou!! My hero/heroine/whomever.
http://www.tcadp.org/cmsms/index.php?page=austin

VIPStephan
10-29-2007, 05:51 PM
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. :D

jlhaslip
10-29-2007, 08:27 PM
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 :D

mranster
10-30-2007, 02:26 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum