SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    Non-Member lostseed's Avatar
    Join Date
    Sep 2005
    Location
    Zurconion Soon!
    Posts
    1,549
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why wont this make separate DIVS?

    PHP Code:
    $max_forms 5;
    for(
    $i=1$i<=$max_forms$i++){

        echo 
    "<div style=\"border: 1px solid red;\">Content Here
    </div>"
    ;
        

    Does anyone know? It just makes 5 "Content Here" and one big div

  2. #2
    SitePoint Wizard silver trophy Jelena's Avatar
    Join Date
    Feb 2005
    Location
    Universum, 3rd Corner
    Posts
    3,001
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No it doesn't. It creates 5 divs.
    -- Jelena --

  3. #3
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you looking at the HTML, or just the look of the thing?
    I can't see how it could produce 1 div.

  4. #4
    Non-Member lostseed's Avatar
    Join Date
    Sep 2005
    Location
    Zurconion Soon!
    Posts
    1,549
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the html says it doesnt, but the way it shows up is 1 div i cannot figure out why

  5. #5
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds like a styling issue rather than a PHP issue then.
    What if you add margin: 0 0 20px 0; to the style attribute? Do they appear seperate then?


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
  •