SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: CSS Question

  1. #1
    SitePoint Addict
    Join Date
    Feb 2000
    Location
    District of Columbia
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I need a little help with style sheets:

    If you have one layer nested withing another layer like this :

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>

    &lt;div class="parent"&gt;
    &lt;div class="child"&gt;content&lt;/div&gt;
    &lt;/div&gt;

    [/code]

    and you add content to the 'child' layer, the 'parent' layer doesnt automatically expand when the child layer expands. It there any way to make it stretch with the 'child' layer?

    I appreciate your help.

    julie

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You can use clipping properties of CSS2 but these are not widely supported (read Netscape) yet.

    Another option would be to set the Height attribute of your layer to AUTO but again that isn't supported by Netscape.

    Something that you might think about is making Parent a scrolling view of Child, kind of like an IFrame. Thomas Brattli has a script to do this at his Site.

    Finally your last option is to not use heights at all but only widths.


    ------------------
    Wayne Luke - Sitepoint Forums Administrator
    Digital Magician Magazine - MetaQuark Creations (Coming Soon)
    sitepoint@digitalmagician.com

  3. #3
    SitePoint Addict
    Join Date
    Feb 2000
    Location
    District of Columbia
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i was looking for a cross browser solution, so the first two are out... using no heights doesnt work in either - maybe i am doing something wrong - i'll go check again


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •