Re: [css-d] can't get my text to wrap!

2006-07-07 Thread Zoe M. Gillenwater
Melissa Carraway wrote:
> I'm developing a site using templates in Dreamweaver. Right now I have an 
> optional area that is enclosed in a DIV tag. I want the non optional content 
> text to wrap around the optional DIV if the DIV is present, and if it's not, 
> I want the copy to just take up the space. Hence the wrap. (the optional div 
> is of a fixed size with an image and text).
>
> Here is what the style sheet looks like for the two elements:
>
> #ndc-sub-06 {
>   position:absolute;
>   left:511px;
>   top:120px;
>   width:216px;
>   height:298px;
>   background-color: #cc;
> }
> #content {
>   position:absolute;
>   left:91px;
>   top:120px;
>   width:80%;
>   height:298px;
>   
> }
> where #ndc-sub-06 is the optional block. 
> Does it matter that the optional block is placed absolutely? I tried floating 
> it, and all that happened was that the copy showed up OVER the block instead 
> of under it. 
>   

Hi Melissa,

Absolute positioning is not a good way to lay out a site. It's ok for 
occasionally placing small elements within constrained areas, but not 
for layout overall. I'm guessing that you've relied on Dreamweaver to 
write your CSS for you, at least to some degree. This will result in 
very inflexible and potentially inaccessible layouts.

I would encourage you to learn about how floats work and adopt them as 
your layout method, writing CSS by hand. Floats would solve your current 
problem: simply float the optional div. If it is there, the adjacent 
content will move out of the way and wrap around it. If it is not there, 
the remaining content will just take up all the room it can. This didn't 
work on your page because you absolutely positioned the remaining 
content. When you do this, it acts as though nothing else exists and 
stubbornly sticks to the same spot on the page no matter what. That's 
what makes it so awful for layout.

Can we see your current page? I'm sure there are lots of things we could 
help you improve on your page so it works better for you.

Zoe

-- 
Zoe M. Gillenwater
Design Services Manager
UNC Highway Safety Research Center
http://www.hsrc.unc.edu


__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] can't get my text to wrap!

2006-07-06 Thread Gunlaug Sørtun
Melissa Carraway wrote:
> [...] Right now I have an optional area that is enclosed in a DIV
> tag. I want the non optional content text to wrap around the optional
> DIV if the DIV is present, and if it's not, I want the copy to just
> take up the space.

 From your description/style it looks like what you want can't be done in
regular web design today. Text can not be made to wrap completely
/around/ anything with only html & CSS as tools.

> Does it matter that the optional block is placed absolutely?

Definitely, since then that element actually doesn't take up any space,
so the surrounding text-flow will not be affected by it at all and
you'll only get a "cover-effect".

> I tried floating it, and all that happened was that the copy showed 
> up OVER the block instead of under it.

Floats will affect the surrounding text-flow, so styling the optional
element as a float is your best chance. However, text can only wrap
around floating elements from _one_ side, not from, or on, both sides.

Floats can only stay left or right - with or without offset, so you
can't place the optional element freely and make the text wrap
completely around it.

A few examples of "cheating" exist, but I haven't seen one that can
simulate something anywhere near perfect, yet.

regards
Georg
-- 
http://www.gunlaug.no
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] can't get my text to wrap!

2006-07-06 Thread Ian Young
This is my first time posting to this list, even though I have been a member
for a little over a year now. Hopefully I'm asking the question correctly,
and yes, I did check the archives before writing... so here goes.

I'm developing a site using templates in Dreamweaver. Right now I have an
optional area that is enclosed in a DIV tag. I want the non optional content
text to wrap around the optional DIV if the DIV is present, and if it's not,
I want the copy to just take up the space. Hence the wrap. (the optional div
is of a fixed size with an image and text).

Here is what the style sheet looks like for the two elements:
..
where #ndc-sub-06 is the optional block.
Does it matter that the optional block is placed absolutely? I tried
floating it, and all that happened was that the copy showed up OVER the
block instead of under it.

Any help would be greatly appreciated! Thanks so much!>>>

Difficult to say without seeing a link to the site.

Go on let's have a peek.

Ian

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.9/382 - Release Date: 04/07/2006

__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


[css-d] can't get my text to wrap!

2006-07-06 Thread Melissa Carraway
Hello all -

This is my first time posting to this list, even though I have been a member 
for a little over a year now. Hopefully I'm asking the question correctly, and 
yes, I did check the archives before writing... so here goes.

I'm developing a site using templates in Dreamweaver. Right now I have an 
optional area that is enclosed in a DIV tag. I want the non optional content 
text to wrap around the optional DIV if the DIV is present, and if it's not, I 
want the copy to just take up the space. Hence the wrap. (the optional div is 
of a fixed size with an image and text).

Here is what the style sheet looks like for the two elements:

#ndc-sub-06 {
position:absolute;
left:511px;
top:120px;
width:216px;
height:298px;
background-color: #cc;
}
#content {
position:absolute;
left:91px;
top:120px;
width:80%;
height:298px;

}
where #ndc-sub-06 is the optional block. 
Does it matter that the optional block is placed absolutely? I tried floating 
it, and all that happened was that the copy showed up OVER the block instead of 
under it. 

Any help would be greatly appreciated! Thanks so much!
-Melissa Carraway
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/