HighDots Forums  

text, ul, image : floating probs

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss text, ul, image : floating probs in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
A.Translator
 
Posts: n/a

Default text, ul, image : floating probs - 04-05-2004 , 11:59 AM






On this page http://huizen.dds.nl/~ochrid/Henk/biblio_nieuw.htm I try to
have three divs: one containing justified text, one containing a ul and one
containing an image.

ul is set to float left, the div with the image in it, to float right.
But both Mozilla and IE put the image underneath the ul, instead of to the
right of it (so it is me, not IE!).

(the image is in a div so that I can write and style text underneath it).

Can someone put me on the right track?
Would be very much appreciated.
--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]

Reply With Quote
  #2  
Old   
Els
 
Posts: n/a

Default Re: text, ul, image : floating probs - 04-05-2004 , 12:06 PM







A.Translator wrote:

Quote:
On this page http://huizen.dds.nl/~ochrid/Henk/biblio_nieuw.htm I try to
have three divs: one containing justified text, one containing a ul and one
containing an image.

ul is set to float left, the div with the image in it, to float right.
But both Mozilla and IE put the image underneath the ul, instead of to the
right of it (so it is me, not IE!).
On my pc (XP) it is IE... Firefox and NS7.1 display the
picture to the right of the ul.
I haven't looked at your code, but it might have to do with
the width of the ul. The indent makes the li's go to the
right, and apparently to much to the right to have the
picture next to it.
Add *{border:1px solid red;} to your stylesheet, to see how
wide things really are. Make sure the total width of the ul
(and it's li's) and the picture div aren't wider than the
width of the container div.


--
Els

Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -



Reply With Quote
  #3  
Old   
A.Translator
 
Posts: n/a

Default Re: text, ul, image : floating probs - 04-05-2004 , 12:18 PM



On Mon, 05 Apr 2004 18:06:08 +0200, Els wrote:

Quote:
The indent makes the li's go to the
right, and apparently to much to the right to have the
picture next to it.
Add *{border:1px solid red;} to your stylesheet, to see how
wide things really are. Make sure the total width of the ul
(and it's li's) and the picture div aren't wider than the
width of the container div.
Thanks for your prompt and helpful reply.
Good to hear things display as intended in FireFox and NS (still not in my
Moz 1.6).
I had thought about there maybe not being enough space: IE shows no
bullets, but seems to indent and push the image to the right.
There should be just enough room, say my red lines.

If I cheat and put the imagebox-div inside the ul-div, IE clearly
illustrates the problem:
http://huizen.dds.nl/~ochrid/Henk/biblio_nieuw2.htm
The image now floats right, and the longest line in the ul oozes over the
rim of the box, so to speak.
--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]


Reply With Quote
  #4  
Old   
Els
 
Posts: n/a

Default Re: text, ul, image : floating probs - 04-05-2004 , 12:31 PM



A.Translator wrote:

Quote:
On Mon, 05 Apr 2004 18:06:08 +0200, Els wrote:

Thanks for your prompt and helpful reply.
Good to hear things display as intended in FireFox and NS (still not in my
Moz 1.6).
I had thought about there maybe not being enough space: IE shows no
bullets, but seems to indent and push the image to the right.
There should be just enough room, say my red lines.

If I cheat and put the imagebox-div inside the ul-div, IE clearly
illustrates the problem:
http://huizen.dds.nl/~ochrid/Henk/biblio_nieuw2.htm
The image now floats right, and the longest line in the ul oozes over the
rim of the box, so to speak.
So, restrict the width of the ul.
And/or use position:relative;left:-4em; on the ul. But that
will make it go to the left in Gecko too.
I don't know if it is possible to make the indent of the
li's equal in 'both' browsers.

--
Els

Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -



Reply With Quote
  #5  
Old   
Els
 
Posts: n/a

Default Re: text, ul, image : floating probs - 04-05-2004 , 12:31 PM



A.Translator wrote:

Quote:
On Mon, 05 Apr 2004 18:06:08 +0200, Els wrote:

I had thought about there maybe not being enough space: IE shows no
bullets, but seems to indent and push the image to the right.
There should be just enough room, say my red lines.
Might have to do with margins. Set all margins to 0 and see
what happens?

--
Els

Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -



Reply With Quote
  #6  
Old   
A.Translator
 
Posts: n/a

Default Re: text, ul, image : floating probs - 04-05-2004 , 12:34 PM



On Mon, 05 Apr 2004 18:31:53 +0200, Els wrote:

Quote:
Might have to do with margins. Set all margins to 0 and see
what happens?
Thanks for all suggestions.
I will try them out and report back - just in case anyone is interested ;-)

--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]


Reply With Quote
  #7  
Old   
A.Translator
 
Posts: n/a

Default Re: text, ul, image : floating probs - 04-05-2004 , 12:40 PM



On Mon, 05 Apr 2004 18:31:01 +0200, Els wrote:

Quote:
And/or use position:relative;left:-4em; on the ul. But that
will make it go to the left in Gecko too.
trial and error made me set it to left:-2em, which has the desired effect
in both my IE 6 and Moz 1.6...

Thank you!
--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]


Reply With Quote
  #8  
Old   
A.Translator
 
Posts: n/a

Default Re: text, ul, image : floating probs - 04-06-2004 , 06:34 AM



On Mon, 5 Apr 2004 18:40:36 +0200, A.Translator wrote:

Quote:
And/or use position:relative;left:-4em; on the ul. But that
will make it go to the left in Gecko too.

trial and error made me set it to left:-2em, which has the desired effect
in both my IE 6 and Moz 1.6...
But Opera makes a mess of it (different problem, by the look of it).
I will start all over again.
--
Groet, Adriana.
[throw rubbish out if you want to reach me by e-mail]


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.