Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Floating of DIVs doesn't work

    Hi, I downloaded template and everything was ok. After I make some changes and now it doesn't work. But I doesn't understand HTML. I read about that and it should be something with floating of DIVs. But I really can figure it out. Can you please give me a hint?

    There's source code: http://gazellafreeware.1apps.com/
    And problem: http://s8.postimg.org/z5zwnzytf/problem.png

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello marleniuspolo,
    There's really no way to tell what went wrong from the information you've given us. The screencap shows it broke but doesn't give any clue as to why. It's always best to post a link to the test site, we can get the markup and CSS from that.

    In the demo of the template you link to, .left and .right are floated inside.cont is 900px wide so any floats you put beside each other inside that containing element could not add up to a width bigger than that.

    Have a quick study of the box model to see why. See the box model here. The box model says that whatever you put inside an element cannot be larger than that element. margin/padding/border all count when figuring width/height.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Tags for this Thread

    Posting Permissions

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