473,772 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DIV Vertical Alignment off in Firefox

3 New Member
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.michiganequ ality.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 2691
drhowarddrfine
7,435 Recognized Expert Expert
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=javas cript". Also, showing the CSS alone does no good but the link you show is all that is needed.
Jun 16 '08 #2
lxa1801
3 New Member
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 Recognized Expert Expert
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
lxa1801
3 New Member
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
30910
by: abracad | last post by:
Hi Is it possible to vertically align an image in the middle of a DIV of fixed height?
1
7901
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 100% and vertically center content inside of it. Therefore, I'm seeking a way, preferably in CSS to vertically center a site. Here's more of a visual to what I have: /********************************
5
8439
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 I want them, but in Firefox on the Mac and both Firefox and IE on the PC, all three boxes are down about a quarter inch. I listed the CSS code on the bottom of that page, can anyone tell me why the boxes aren't going where they should? Thanks in...
15
2262
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 done using a table. A, B, and C were each <tdelements.
6
7873
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: http://www.westmidlandbirdclub.com/diary/ Thank you. --
11
19229
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
15569
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 display of table, the first inner div has display of table-cell and the inner-most div has the text. The outer div has a set width and height. So here's the problem: Without the inner divs having a width and height set, the overflow:hidden doesn't...
8
3553
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: body { font-family: Trebuchet MS, Arial; cursor : default; background:#000000 url("Images/long-template.jpg"); background-repeat:no-repeat; background-position: center; background-attachment:scroll; height: 1228px;
13
1662
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 figure how to have IE7 work. Why? How can I have it work in all 3 browsers? http://nrap.selfip.com
0
9620
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10104
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.