Css question?

Discussion in 'Software' started by carpe diem12, Aug 28, 2011.

  1. carpe diem12

    carpe diem12 Private E-2

    Hi there guys,

    I was trying to write up this css code and the problem is that the right side nav is floated right,which is what I intended but not parallel to the other two columns..would anyone happen to know why this is I have posted the css code below....I would appreciate it if only one could help.

    Thanks...


    #thepicture {

    width:200px;
    float :left;
    margin-left:20px;

    }

    #rightnav {

    width:200px;
    float:right;
    background-color:red;
    }

    #container {

    width:300px;
    margin:auto;
    background-color:blue;
    }
     
  2. PC-XT

    PC-XT Master Sergeant

    I assume you are listing them in order from left to right, which will cause this. #container must be last in the HTML, since it is not floated. Any floated element you list after the non-floated element will appear under it. (This is only in the HTML, order in the CSS doesn't matter this much.)
     
  3. mjnc

    mjnc MajorGeek

    If you haven't already fixed this, it would help to see the HTML structure and give some more info on how you want it to appear.

    Are your widths correct?
    Are you getting a 'float drop'?
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds