Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - css container query

 
Thread Tools Search this Thread
Old 04-25-2004, 10:14 PM   #1
Default css container query


Hi
I want to have a container around 2 columns with a background image. In IE
the container expands depending on the content but in Mozilla I seem to have
to specify the height of the div to be able to see it... you will notice
that it looks ok in IE but the background image is not showing in Mozilla
I have done similar before and it worked fine but there seems to be a
problem now.
Link is http://www.lightbox.ie/test/
If anyone had any thoughts it would be great... basically I want the div
with id of mcc to expand as the divs leftcontent and rightcontent expand...
Thanks in advance
Tom




Tom
  Reply With Quote
Old 04-25-2004, 10:26 PM   #2
GD
 
Posts: n/a
Default Re: css container query

Tom <> wrote:
> I want to have a container around 2 columns with a background image.


If you've floated the left and right columns then the containing block
will collapse to fit the remaining content. If the floated columns are
the only thing in the container then it will collapse to zero-height.

To make it expand to fit the floated columns you need to put something
after them and use the CSS clear property (its values can be 'left',
'right' or 'both'). Example:


<div style="border:black solid 1px;">
<p style="float:left; width:50%;">Floated left</p>
<p style="float:right; width:50%;">Floated right</p>
<p style="clear:both;><a href="#top">Back to top of page</a></p>
</div>


  Reply With Quote
Old 04-26-2004, 03:09 AM   #3
Richard
 
Posts: n/a
Default Re: css container query

Tom wrote:

> Hi
> I want to have a container around 2 columns with a background image. In
> IE the container expands depending on the content but in Mozilla I seem
> to have to specify the height of the div to be able to see it... you will
> notice that it looks ok in IE but the background image is not showing in
> Mozilla I have done similar before and it worked fine but there seems to
> be a problem now.
> Link is http://www.lightbox.ie/test/
> If anyone had any thoughts it would be great... basically I want the div
> with id of mcc to expand as the divs leftcontent and rightcontent
> expand... Thanks in advance
> Tom



Try my solution. http://1-large-world.com/samples/sample1.html
http://1-large-world.com/samples/sample2.html

Place your menu links inside the "header" division as well as your banner.
Use the "sidebar" division as desired.
Or not at all and add your graphics into another division using
"float:left;".



  Reply With Quote
Old 04-26-2004, 02:05 PM   #4
Tom
 
Posts: n/a
Default Re: css container query

> If you've floated the left and right columns then the containing block
> will collapse to fit the remaining content. If the floated columns are
> the only thing in the container then it will collapse to zero-height.
>
> To make it expand to fit the floated columns you need to put something
> after them and use the CSS clear property (its values can be 'left',
> 'right' or 'both'). Example:
>


Thanks
That sorts it out... had problems with the clear properties before...


  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Forum Jump