Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


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

Thread: DIVS

  1. #1
    Join Date
    Apr 2006
    Posts
    1,463
    Tokens
    0

    Latest Awards:

    Default DIVS

    Ok i can code in iFrames and expandbles but people now seem to use DIVS what is it and is their and tuts for it.

  2. #2
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    Divs are really easy tbh and far better than tables

    Example one:

    HTML Code:
    <div id="text" style="position:absolute;left:48px;top:328px;width:150px;height:50px;z-index:2" align="left">
    You can position text anywhere on the page!
    </div>
    Example 2:

    HTML Code:
    <style type="text/css">
    #text {
    position:absolute;
    left:48px;
    top:328px;
    width:150px;
    height:50px;
    z-index:2;
    }
    </style>
    <body>
    <div id="text" align="left">You can position text anywhere on the page! </div>
    Both would produce the same (I think) but one the location is stored in CSS and the other (actually i think its still css) in the actual div. Alignment (I think) must be in the div (not confirmed)

    ps there are proably coding errors (aswell as spelling)
    Last edited by Chippiewill; 07-10-2007 at 01:05 PM. Reason: Missed a bit of coding
    Chippiewill.


  3. #3
    Join Date
    Aug 2005
    Location
    London
    Posts
    9,773
    Tokens
    146

    Latest Awards:

    Default

    If your coding with divs then you'll need CSS knowledge , you set everythign up with css like the size and positioning then you do your div tag and write the html init , This is a basic code for a simple layout with just a banner and main content area.
    PHP Code:
    <html>
    <
    head>
    <
    title>Sitename</title>
    <
    style type="text/css">
    <!--
    body {
      
    margin0px;
      
    padding0px;
    }
    #header {
      
    background-imageurl(http://) ;
      
    width100%;
      
    height50px;
    }
    #content {
      
    background#6495ED;
      
    width100%;
      
    height500px;
      
    text-align:center;
    }
    -->
    </
    style>
    </
    head>
    <
    body>
    <
    div id="header"><img src="http://bannerimage"></div>
    <
    div id="content">Content</div>
    </
    body>
    </
    html
    Just study the codes of sites with divs on and you'll get the drift.

  4. #4
    Join Date
    Jul 2007
    Location
    Scotland
    Posts
    529
    Tokens
    0

    Default

    Quote Originally Posted by 00chips View Post
    Divs are really easy tbh and far better than tables

    Example one:

    HTML Code:
    <div id="text" style="position:absolute;left:48px;top:328px;width:150px;height:50px;z-index:2" align="left">
    You can position text anywhere on the page!
    </div>
    Example 2:

    HTML Code:
    <style type="text/css">
    #text {
    position:absolute;
    left:48px;
    top:328px;
    width:150px;
    height:50px;
    z-index:2;
    }
    </style>
    <body>
    <div id="text" align="left">You can position text anywhere on the page! </div>
    Both would produce the same (I think) but one the location is stored in CSS and the other (actually i think its still css) in the actual div. Alignment (I think) must be in the div (not confirmed)

    ps there are proably coding errors (aswell as spelling)
    Loads of coding errors. For a start with DIV's why the hell use align="" in it? Thats what the float element is for.

  5. #5
    Join Date
    Apr 2006
    Posts
    1,463
    Tokens
    0

    Latest Awards:

    Default

    so what tut shall I use and how is thise coduing the layout :S
    Sos am a newb at coding

  6. #6
    ScottDiamond. Guest

    Default

    Quote Originally Posted by 00chips View Post
    Divs are really easy tbh and far better than tables

    Example one:

    HTML Code:
    <div id="text" style="position:absolute;left:48px;top:328px;width:150px;height:50px;z-index:2" align="left">
    You can position text anywhere on the page!
    </div>
    Example 2:

    HTML Code:
    <style type="text/css">
    #text {
    position:absolute;
    left:48px;
    top:328px;
    width:150px;
    height:50px;
    z-index:2;
    }
    </style>
    <body>
    <div id="text" align="left">You can position text anywhere on the page! </div>
    Both would produce the same (I think) but one the location is stored in CSS and the other (actually i think its still css) in the actual div. Alignment (I think) must be in the div (not confirmed)

    ps there are proably coding errors (aswell as spelling)
    What a load of crap! Why the hell would you use align="" and why the hell have you got all that junk that isn't needed?

  7. #7
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    And, why are you using position absolute. It's the worst thing to code a WHOLE layout in.

  8. #8
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    Quote Originally Posted by 00chips View Post
    ps there are proably coding errors (aswell as spelling)

    Hello i didnt say it was perfect :rolleyes:
    Chippiewill.


  9. #9
    Join Date
    Oct 2006
    Location
    West Midlands
    Posts
    463
    Tokens
    1,935

    Latest Awards:

    Default

    Quote Originally Posted by Invent View Post
    And, why are you using position absolute. It's the worst thing to code a WHOLE layout in.
    Isnt that when you open it up in a webeditor and you can move it any where on the page? or am i mixed up with something else..

  10. #10
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    hehe were learning how to do this at college, im the only who who knows about css apart from the tutor and for once I feel advanced But on this forum, I feel a noob :p

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
  •