473,388 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

DIV Vertical Alignment off in Firefox

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:
Expand|Select|Wrap|Line Numbers
  1. #containerbody { 
  2.     display: table;
  3.     position: relative;
  4.     text-align: center;
  5.     background-image: url('http://www.michiganequality.org/siteimages/columngif.gif');
  6.     padding: 0px 0px 0px 0px;  
  7.     margin: 0 auto; 
  8.     width: 893px;
  9.     height: 100%;
  10.     }
  11. #leftside { 
  12.     float:left;
  13.     background: #000000; 
  14.     padding: 0px 0px 0px 0px;  
  15.     margin: 0 auto; 
  16.     width: 139px; 
  17.     }
  18. #rightside { 
  19.     font-family: Verdana, Arial, Helvetica, sans-serif;
  20.     margin: 0px 0px 0px 0px;
  21.     font-size: 11px;
  22.     line-height: 19px;
  23.     color: #000000;
  24.     float:right;
  25.     text-align: left;
  26.     background: #ffffff; 
  27.     padding: 23px 33px 21px 33px; 
  28.     width: 688px; 
  29.     }
  30. .rightside2 { 
  31.     font-family: Verdana, Arial, Helvetica, sans-serif;
  32.     margin: 8px 0px 0px 0px;
  33.     font-size: 11px;
  34.     line-height: 19px;
  35.     color: #000000;
  36.     }
  37.     #rightsidemain { 
  38.     font-family: Verdana, Arial, Helvetica, sans-serif;
  39.     margin: 0 auto;
  40.     font-size: 11px;
  41.     line-height: 19px;
  42.     color: #000000;
  43.     float:right;
  44.     text-align: left;
  45.     vertical-align: top;
  46.     background: #ffffff; 
  47.     padding: 0px 0px 0px 0px; 
  48.     width: 754px; 
  49.     }
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!
Jun 16 '08 #1
4 2662
drhowarddrfine
7,435 Expert 4TB
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.
Shorttag errors can be very significant. In addition, they show you are declaring transitional HTML but using XHTML tags. Plus you have a CSS error that needs fixing.

Having a valid web page does not mean your page will display correctly. It only means you used the correct syntax.

Why are you using transitional? New pages have no need for the transitional doctype.

Do not look at Firefox and ask why it doesn't work like old, broken, non-standard IE, but ask why is IE doing not acting like Firefox. Firefox is the standard to follow, never IE.

There is no such thing as "language=javascript". Also, showing the CSS alone does no good but the link you show is all that is needed.
Jun 16 '08 #2
Actually I went through this morning and fixed all the validation errors. It is now all validated. Honestly, I took over the site from the original designer as the owners weren't happy with the response time, so I just left the doctype in there as it originally was. Do you have a recommendation as to what it should be? I was reading more about it this morning, but couldn't figure out what doctype I should be using.

What is the CSS error? I can't seem to find it.

I wasn't trying to make it work from what IE has, it's just that oddly enough it does what I want it to do in IE but not in Firefox.

Thanks for the help.
Jun 16 '08 #3
drhowarddrfine
7,435 Expert 4TB
Yes, I noticed things had changed compared to what you stated.
Negative numbers are not allowed on padding.

It's more difficult to change the doctype after a page is created. That's why I said "new pages" should not use transitional since the only purpose of that doctype is to allow for deprecated elements. All new pages should always use 'strict' but changing to strict now may change the look of your page.
Jun 16 '08 #4
Negative numbers are not allowed on padding.
Oh right, I fixed that. That was actually in the css sheet used for printing. Nevertheless, still encountering the same problem.
Jun 16 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: abracad | last post by:
Hi Is it possible to vertically align an image in the middle of a DIV of fixed height?
1
by: Kenneth | last post by:
Okay, I've been scouring Google for hours looking for a solution to this problem, but as of yet I can't find one. XHTML Transitional seems to specify that I can no longer set a table's height to...
5
by: webhead | last post by:
Here is a link to the page in question: http://test.fether.net/pagelayout.php I want the three boxes inside the gold area to all be tight against the top of it. In Safari, the boxes are where...
15
by: scott | last post by:
Hello, I'm working on updating some of my table-based sites to use CSS instead of tables. One of my sites has a header that is composed of three elements: A B C In my prior design, this was...
6
by: Andy Mabbett | last post by:
Please can someone remind me of the most elegant fix for the way Firefox fails to vertically align cell content by default? For example, the second event on: ...
11
by: C.W.Holeman II | last post by:
I what to hide an input element and the following text. I have the selector for the input working and just need to grab the text following it. CSS: form{ display:table; text-align:center; }
2
by: esteuart | last post by:
I need to get the right combination for a div to clip any text inside and allow vertical alignment. I only have this problem in FireFox. I have 3 divs nested within each other. The outer div has...
8
by: ayamopamo | last post by:
Hi- I am trying to center a web page. It seems like this should be very simple to do, but apparently it isn't my day. I have successfully centered the background by calling it in the css body tag:...
13
by: Bill | last post by:
Hi How can I have IE7 act correctly on that ? The rules make the link text go down when hovered. It works in FF , I had to add a hard space right after the LI tag to have OP9 work but I can't...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.