Help - Search - Members - Calendar
Full Version: div vertical alignment off
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
daspion
Okay, so here is my issue. I have done a W3C validation and the errors I get are mostly alt or shorttag, doesn't appear to be anything connected to this problem.

You can view the site at www.michiganequality.org/index.htm

Basically, the site views properly in IE, however, in Firefox the rightsidemain div does not align back at the top of the containerbody div, but rather aligns where the leftside div left off.

Now, the site was working properly until I changed some code regarding the flash menu. I wanted it to be more accessible to those without flash and for SEO and utilized SWFObject to display alternate content when flash was not detected. Once I did that, however, this problem showed up.

Here is the CSS code:

CODE

#containerbody {
    display: table;
    position: relative;
    text-align: center;
    background-image: url('http://www.michiganequality.org/siteimages/columngif.gif');
    padding: 0px 0px 0px 0px;  
    margin: 0 auto;
    width: 893px;
    height: 100%;
    }
#leftside {
    float:left;
    background: #000000;
    padding: 0px 0px 0px 0px;  
    margin: 0 auto;
    width: 139px;
    }
#rightside {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    margin: 0px 0px 0px 0px;
    font-size: 11px;
    line-height: 19px;
    color: #000000;
    float:right;
    text-align: left;
    background: #ffffff;
    padding: 23px 33px 21px 33px;
    width: 688px;
    }
.rightside2 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    margin: 8px 0px 0px 0px;
    font-size: 11px;
    line-height: 19px;
    color: #000000;
    }
    #rightsidemain {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    margin: 0 auto;
    font-size: 11px;
    line-height: 19px;
    color: #000000;
    float:right;
    text-align: left;
    vertical-align: top;
    background: #ffffff;
    padding: 0px 0px 0px 0px;
    width: 754px;
    }



The HTML calls forth containerbody, then leftside within. Within leftside it calls the alternate div for the flash menu, then closes both the alternate and leftside and open the rightsidemain div. Finally closing both rightsidemain and containerbody div.

Any ideas why the rightsidemain is not aligning to the top? I'm stumped. Thanks in advance!
daspion
I've gone back and fixed the validation errors, just in case. No change.
Darin McGrew
Okay, div#rightsidemain floats to the right, with a width of 754px, and div#containerbody has a width of 893px, which leaves only 139px for div#leftside. But div#leftside has a width of auto, so it's going to take the full width available to it. Except that you've specified "display: none" for it.

Hmm... Why am I seeing div#leftside at all?
daspion
QUOTE(Darin McGrew @ Jun 16 2008, 02:23 PM) *

Okay, div#rightsidemain floats to the right, with a width of 754px, and div#containerbody has a width of 893px, which leaves only 139px for div#leftside. But div#leftside has a width of auto, so it's going to take the full width available to it. Except that you've specified "display: none" for it.

Hmm... Why am I seeing div#leftside at all?


Oh sorry, I changed the leftside to auto trying to fix the problem, it was originally at 139px (i've put it back now). There are also two css files, one is equality.css and one is equalityprint.css. The print one is meant for printing, which is where the display: none is.
Darin McGrew
You seem to have fixed it. What did you change?
daspion
QUOTE(Darin McGrew @ Jun 16 2008, 03:08 PM) *

You seem to have fixed it. What did you change?


I just changed the auto to 139px, but I'm still showing the problem in Firefox.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.