Question about floating blocks of texts, pics - pls lend a hand!

Discussion in 'HTML & Website Design' started by Camus, Dec 29, 2006.

  1. #1
    Hey there,

    I am sort of a novice when it comes to web design - I am using Dreamweaver to design a simple fansite.

    I would like to have a large block containing the body of my site with 15% margins on the sides.

    The block will contain nested layers (blocks) which will contain text and/or pics.

    I want all the blocks on the site to float left as the browser is resized.

    Please - is there an easy way to do this? I have been reading about CSS and floating layers until my head hurts and I cannot figure this out.

    Again, I just have blocks within blocks and I want everything to float left. Thanks so so much for any help you can give.

    Camus
     
    Camus, Dec 29, 2006 IP
  2. dkessaris

    dkessaris Peon

    Messages:
    984
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I am not a coder but I believe what you are asking is quite simple
    Somthing like
    
    #container {
    margin: 2% 15% 5% 15%;
    other properties here
    }
    
    #block1{
    float:left;
    other properties here
    }
    
    #block2{
    float:left;
    other properties here
    }
    
    etc
    
    PHP:
    And then at your html it will be something like

    <div id="container">
    <div id="block1"> something here </div>
    <div id="block2"> something here </div>
    </div>
    PHP:
    That way both blocks are contained within the main container, block one is positioned to the left and block2 to the left of block1. If you want block2 to the left (not the left of block1) you can add a clear right at block1

    However don't take my word on the above, I have minimal experience with coding.


     
    dkessaris, Dec 29, 2006 IP