HighDots Forums  

How to extend a div ?

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


Discuss How to extend a div ? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kerberos
 
Posts: n/a

Default How to extend a div ? - 01-06-2005 , 09:58 AM






I have a main div with 2 divs inside, one of them floating to the right
(they look like 2 columns).
The main div has a background image.

How can I have the main div to adapt to the maximum height of the divs
inside of it so that the background image of the main div repeats
vertically according to the height of the 2 divs inside? This way, the
content of one of the 2 divs wouldn't overlap the main div, but push its
border.

Thanks.

--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.auriance.com
http://www.osresources.com
http://exodus.jabberstudio.org

Reply With Quote
  #2  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: How to extend a div ? - 01-06-2005 , 10:21 AM






Kerberos wrote:
Quote:
I have a main div with 2 divs inside, one of them floating to the right
(they look like 2 columns).
The main div has a background image.

How can I have the main div to adapt to the maximum height of the divs
inside of it so that the background image of the main div repeats
vertically according to the height of the 2 divs inside? This way, the
content of one of the 2 divs wouldn't overlap the main div, but push
its border.
It should do anyway, unless you are using absolute positioning. URL?

--
Mark.
http://tranchant.plus.com/


Reply With Quote
  #3  
Old   
Johannes Koch
 
Posts: n/a

Default Re: How to extend a div ? - 01-06-2005 , 10:26 AM



Mark Tranchant wrote:

Quote:
Kerberos wrote:

I have a main div with 2 divs inside, one of them floating to the
right (they look like 2 columns).
The main div has a background image.

How can I have the main div to adapt to the maximum height of the
divs inside of it so that the background image of the main div
repeats vertically according to the height of the 2 divs inside? This
way, the content of one of the 2 divs wouldn't overlap the main div,
but push its border.

It should do anyway, unless you are using absolute positioning. URL?
No, Kerberos uses float. So the floated column may overlap.
Kerberos: add an element with 'break: right' within the main div after
the two column divs.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


Reply With Quote
  #4  
Old   
Chris Leipold
 
Posts: n/a

Default Re: How to extend a div ? - 01-06-2005 , 10:27 AM



Hi,

your post sounds like the second try of your basic question. I fear it's
not so basic... I thought a bit - you might try it like your first
attempt, two divs side by side, giving each a border of 1px (wich gives
a sum of 2 px) and move the right div with margin-left:-1px one pixel to
the left. Then you have a border with a width of 1px and the length of
the longer div.

Don't forget to set the div with the negative margin position:relative,
since IE will hide a part of the div otherwise.

Chris


Kerberos wrote:
Quote:
I have a main div with 2 divs inside, one of them floating to the right
(they look like 2 columns).
The main div has a background image.

How can I have the main div to adapt to the maximum height of the divs
inside of it so that the background image of the main div repeats
vertically according to the height of the 2 divs inside? This way, the
content of one of the 2 divs wouldn't overlap the main div, but push
its border.

Thanks.


Reply With Quote
  #5  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: How to extend a div ? - 01-06-2005 , 10:35 AM



Johannes Koch wrote:

Quote:
No, Kerberos uses float. So the floated column may overlap.
Kerberos: add an element with 'break: right' within the main div after
the two column divs.
My mistake. To make up for it, I'll point out that I think you mean
"clear" instead of "break"?

--
Mark.
http://tranchant.plus.com/


Reply With Quote
  #6  
Old   
Johannes Koch
 
Posts: n/a

Default Re: How to extend a div ? - 01-06-2005 , 10:43 AM



Mark Tranchant wrote:

Quote:
My mistake. To make up for it, I'll point out that I think you mean
"clear" instead of "break"?
Yes, my mistake :-)
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


Reply With Quote
  #7  
Old   
Kerberos
 
Posts: n/a

Default Re: How to extend a div ? - 01-06-2005 , 10:58 AM



Em Thu, 06 Jan 2005 17:43:47 +0100, Johannes Koch <koch (AT) w3development (DOT) de>
escreveu:

Quote:
Mark Tranchant wrote:

My mistake. To make up for it, I'll point out that I think you mean
"clear" instead of "break"?

Yes, my mistake :-)
Thank you guys I know there is this solution of adding a block-level
element such as a division, and defining it as clear: both, it works fine
actually:

http://www.auriance.com/docs/auriance/autre.html

But then, we don't separate content and structure from presentation
anymore
I know, I know...

--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.auriance.com
http://www.osresources.com
http://exodus.jabberstudio.org


Reply With Quote
  #8  
Old   
Kerberos
 
Posts: n/a

Default Re: How to extend a div ? - 01-07-2005 , 09:22 AM



Em Thu, 06 Jan 2005 18:14:03 -0600, kchayka <usenet (AT) c-net (DOT) us> escreveu:

Quote:
Kerberos wrote:

http://www.auriance.com/docs/auriance/autre.html

Are you aware that there are no background colors set? My browser
default background color is not white, so it's pretty obvious.

Really? Good to know... What browser do you use?

--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.auriance.com
http://www.osresources.com
http://exodus.jabberstudio.org


Reply With Quote
  #9  
Old   
Johannes Koch
 
Posts: n/a

Default Re: How to extend a div ? - 01-07-2005 , 09:33 AM



Kerberos wrote:

Quote:
Em Thu, 06 Jan 2005 18:14:03 -0600, kchayka <usenet (AT) c-net (DOT) us> escreveu:

Are you aware that there are no background colors set? My browser
default background color is not white, so it's pretty obvious.


Really? Good to know... What browser do you use?
Many browser allow you to change the default (background) color.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


Reply With Quote
  #10  
Old   
Kerberos
 
Posts: n/a

Default Re: How to extend a div ? - 01-08-2005 , 12:44 PM



Em Fri, 07 Jan 2005 16:33:11 +0100, Johannes Koch <koch (AT) w3development (DOT) de>
escreveu:

Quote:
Many browser allow you to change the default (background) color.
Yes, I know, but I thought no browser had grey as default background
anymore...
Oh well, I haven't used all browsers yet.
"Link" has black as default background color!

--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.auriance.com
http://www.osresources.com
http://exodus.jabberstudio.org


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.