Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Hmph.

  1. #1
    Join Date
    May 2005
    Location
    united kingdom
    Posts
    8,084
    Tokens
    595

    Latest Awards:

    Default Hmph.

    How can I make a DIV expand to the size of the content in which I have put it? I've done this:

    HTML Code:
    CSS: #content {
        position:absolute;
        width:680px;
        left: 170px;
        top: 120px;
        border: 1px solid black;}
    
    ----------------------------
    
    <div id="content">
      <table width="680" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td bgcolor="#336699"><marquee>
          Welcome to Habbo Positive :-: A positive place full of positive people :-: Visit our forums by clicking <a href="http://www.habbo-positive.co.uk" target="resourcewindow">here</a>
          </marquee></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF"><iframe src="welcome.html" width="100%" height="100%" frameborder="0" scrolling="no" name="main">Your browser doesn't support inline frames</iframe></td>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF">&nbsp;</td>
        </tr>
      </table>
    </div>
    I tried using a table but it still doesn't work. p.s. forgive my rubbish coding :] I'm new to it all.
    Last edited by myke; 06-11-2006 at 05:17 PM.

    drink up this bottle of yeah
    and P A I N T your body on me


  2. #2
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    1,012
    Tokens
    175

    Latest Awards:

    Default

    Well the whole idea of DIV's has gone out of the window in your coding. DIV's = No need for tables. Remove the table and just type. It'll expand in height for as much as you want.


    You don't like me
    Chances are I don't like you.

  3. #3
    Join Date
    May 2005
    Location
    united kingdom
    Posts
    8,084
    Tokens
    595

    Latest Awards:

    Default

    Ok, I understand that however I'm using Iframes to do the content, the DIV doesn't expand.

    drink up this bottle of yeah
    and P A I N T your body on me


  4. #4
    Join Date
    Dec 2004
    Posts
    7,327
    Tokens
    2,081
    Habbo
    ---MAD---

    Latest Awards:

    Default

    Quote Originally Posted by SyrupyMonkey View Post
    Ok, I understand that however I'm using Iframes to do the content, the DIV doesn't expand.
    Iframes wont expand as they load everything in them, its like a window in a window basically.
    ---MAD---

  5. #5
    Join Date
    May 2005
    Location
    united kingdom
    Posts
    8,084
    Tokens
    595

    Latest Awards:

    Default

    Yes, I know that but it wont expand the div. If I'm wrong tell me and is there a way to get around it? ;[

    drink up this bottle of yeah
    and P A I N T your body on me


  6. #6
    Join Date
    Dec 2004
    Posts
    7,327
    Tokens
    2,081
    Habbo
    ---MAD---

    Latest Awards:

    Default

    I am not an expert with divs as I usually use iframes. Most people dislike iframes because of the fact they dont expand.

    You will need to use includes I believe.
    ---MAD---

  7. #7
    Join Date
    May 2005
    Location
    united kingdom
    Posts
    8,084
    Tokens
    595

    Latest Awards:

    Default

    Any non PHP ways? ;[

    drink up this bottle of yeah
    and P A I N T your body on me


  8. #8
    Join Date
    Feb 2005
    Posts
    599
    Tokens
    25

    Default

    you can get iframes which dont use scoll bars and expand,

    yes mike that means html

    EDIT:

    try this

    <iframe name="FRAMENAME" id="FRAME ID" src="FILE" width="100%" frameborder="0" allowtransparency="yes" scrolling="no"></iframe>
    Last edited by RareWolf; 06-11-2006 at 07:05 PM.

  9. #9
    Join Date
    May 2005
    Location
    united kingdom
    Posts
    8,084
    Tokens
    595

    Latest Awards:

    Default

    Nope andy, same thing again ;[

    drink up this bottle of yeah
    and P A I N T your body on me


  10. #10
    Join Date
    Feb 2005
    Posts
    599
    Tokens
    25

    Default

    i dont get what you mean [dont know divs]

Page 1 of 2 12 LastLast

Posting Permissions

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