CSS span problem

Discussion in 'CSS' started by topic, Oct 9, 2008.

  1. #1
    Hallo guys...
    I have problems with cSS and I really need your help :)

    Well I have got this html code
    <div>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    </div>

    and I should make CSS style which should give me this result (see photo):
    http://img518.imageshack.us/my.php?image=css1xk3.gif

    I appreciate your help!
     
    topic, Oct 9, 2008 IP
  2. kiks

    kiks Banned

    Messages:
    269
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i don't understand, you want 6 squares, or you want 9 squares?

    Thanks
     
    kiks, Oct 9, 2008 IP
  3. topic

    topic Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I am not sure as well actually.
    I think it is 4 squares which goes over each other and create that image. Maybe some positioning would make it.
     
    topic, Oct 9, 2008 IP
  4. kiks

    kiks Banned

    Messages:
    269
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Test this code, and let me know if this is what you wanted:

    <html>
    <body>
    <div style="width: 410px; height: 410px;">
    <div style="width: 200px; height: 200px; float: left; border: solid 1px black;">
    1
    </div>
    <div style="width: 200px; height: 200px; float: left; border: solid 1px black; margin-left: -20px;">
    2
    </div>
    <div style="width: 200px; height: 200px; float: left; border: solid 1px black;margin-top: -20px;">
    3
    </div>
    <div style="width: 200px; height: 200px; float: left; border: solid 1px black;margin-left: -20px;margin-top: -20px;">
    4
    </div>

    </div>

    </body>
    </html>

    Regards
     
    kiks, Oct 9, 2008 IP
  5. topic

    topic Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks, works like a charm!

    I tried to solve similar problem, but without any good final result. Check it please if you have some free time:
    http://img507.imageshack.us/my.php?image=css2jc1.gif
     
    topic, Oct 9, 2008 IP
  6. kiks

    kiks Banned

    Messages:
    269
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You welcome.
    I will have a look on your other problem in few minutes
     
    kiks, Oct 9, 2008 IP
  7. kiks

    kiks Banned

    Messages:
    269
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    This one is more complicated :D
     
    kiks, Oct 9, 2008 IP
  8. kiks

    kiks Banned

    Messages:
    269
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8
    But i have the solution for you:

    <html>
    <body>
    <div style="width: 404px; height: 404px; border: solid 1px black; margin-left: 50px; margin-top: 50px;">

    <div style="width: 100px; height: 100px; float: left; border: solid 1px black; margin-left: -50px; margin-top:-50px;">
    1
    </div>
    <div style="width: 100px; height: 100px; float: right; border: solid 1px black; margin-right: -50px; margin-top: -50px;">
    2
    </div>

    <div style="width: 300px; height: 300px; border: solid 1px red; margin-left: 51px; margin-top: 51px;">

    </div>

    <div style="width: 100px; height: 100px; float: left; border: solid 1px black; margin-left: -50px; margin-bottom:-50px;">
    3
    </div>
    <div style="width: 100px; height: 100px; float: right; border: solid 1px black;margin-right: -50px; margin-bottom: -50px;">
    4
    </div>

    </div>


    </body>
    </html>
     
    kiks, Oct 9, 2008 IP
  9. kiks

    kiks Banned

    Messages:
    269
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #9
    is ok for you, this last solution?
     
    kiks, Oct 9, 2008 IP
  10. topic

    topic Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Hi again, the second solution not workin so good. Only top left showing good, other not...
     
    topic, Oct 9, 2008 IP
  11. kiks

    kiks Banned

    Messages:
    269
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #11
    what browser are you using?
    can you send an image?
     
    kiks, Oct 9, 2008 IP