Results 1 to 7 of 7

Thread: div Float

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Resolved div Float

    I'm not sure if I'm doing it right but it doesn't seem to view right. This is the code btw.
    Code:
    <html>
    <head>
    <style>
    body {
    font: 9pt arial;
    }
    div.float {
    float:left;
    }
    </style>
    </head>
    <body>
    <div class="div.float">
    <img src="31peace.jpg"></div>
    Kids take up arms as way out of poverty, study says
    November 16, 2005<br>
    ELSEWHERE in the world, children are abducted and forced or tortured
    into joining armed movements. But in the Philippines, they apparently
    freely do so.<br>
    <br>
    </body>
    </html>
    All I just need is the image to float left and the text besides it on the right. Something wrong with my code?
    Last edited by nebulom; Dec 23rd, 2005 at 03:13 AM.

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: div Float

    What happens now?
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: div Float

    I need the texts to be beside the image, but this I get.
    Attached Images Attached Images  

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: div Float

    Have you tried putting the text in paragraph tags?
    HTML Code:
    <html>
    <head>
    <style>
    body {
    font: 9pt arial;
    }
    div.float {
    float:left;
    }
    </style>
    </head>
    <body>
    <div class="div.float">
    <img src="31peace.jpg"></div>
    <p>Kids take up arms as way out of poverty, study says
    November 16, 2005<br>
    ELSEWHERE in the world, children are abducted and forced or tortured
    into joining armed movements. But in the Philippines, they apparently
    freely do so.<br>
    <br></p>
    </body>
    </html>
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: div Float

    Tried and nothing happens. Except for bringing the text down a little.

  6. #6
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: div Float

    I have looked at your styles, you should use just float as the class name for the div. Also you may want to just flaot the image, not have it inside the div.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: div Float

    I missed that part. Works fine now, thanks a lot.

Posting Permissions

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



Click Here to Expand Forum to Full Width