Float not working

Discussion in 'HTML & Website Design' started by timelf123, Jul 24, 2007.

  1. #1
    I can't figure out why the heck this won't work!

    I am coding this site and I cannot figure out for the life of me why the prize section at the right wont go under the header

    Any ideas?
     
    timelf123, Jul 24, 2007 IP
  2. missdanni

    missdanni Guest

    Best Answers:
    0
    #2
    Looking at your page source I don't see where you have the float set - the only css sheet linked is for the ajax?

    <div style="float:right; padding:2px;"></div>
     
    missdanni, Jul 24, 2007 IP
  3. timelf123

    timelf123 Peon

    Messages:
    897
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The CSS is in global2.css.
    Here are some snippets:

    #pagewidth{ 
     width:870px; 
     text-align:left;  
    margin-left:auto; 
     margin-right:auto;  
     margin-top: 12px;
    } 
     
    #sidebar {
    	padding:0px;
    	margin:0px:
    	float:left;
    	width:324px;
    	max-width:324px;
    }
    
    #rightlog {
    float:left;
    margin:0px 0px 0px 0px;
    width:300px;
    padding-right:20px;
    }
    Code (markup):
    pagewidth is my container, and sidebar should be on the left, while rightlog should be directly to the right of the sidebar. instead it is appearing below and to the right (or left, i was messing around with its float)

    edit: i set positioning to absolute for now, as I need to keep working on the site
     
    timelf123, Jul 24, 2007 IP
  4. missdanni

    missdanni Guest

    Best Answers:
    0
    #4
    #sidebar {
    padding:0px;
    margin:0px:
    float:left;
    width:324px;
    max-width:324px;
    }

    #rightlog {
    margin:0px 0px 0px 0px;
    width:300px;
    padding-right:20px;
    }

    See if that works. I don't think you need to float both.
     
    missdanni, Jul 24, 2007 IP
    timelf123 likes this.
  5. timelf123

    timelf123 Peon

    Messages:
    897
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanks! i thought i had that before... weird
     
    timelf123, Jul 24, 2007 IP
  6. missdanni

    missdanni Guest

    Best Answers:
    0
    #6
    Sometimes you just need to walk away a few minutes and then come back.
    Or borrow some fresh eyes :p
     
    missdanni, Jul 24, 2007 IP
  7. timelf123

    timelf123 Peon

    Messages:
    897
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Tell me about it, mine are all over the place haha.
    thanks again, rep added
     
    timelf123, Jul 24, 2007 IP