473,385 Members | 1,834 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,385 software developers and data experts.

CSS alignment problem with FireFox

Kimpossible
Hi,
This is my first post. I'm trying to do a web site in all css for a change, I usually do tables. I'm starting from the top of the page and formatting as I go.

The problem I'm having is with FireFox. The layout looks fine in IE.

The 3rd column is not aligning to the top of the column on Firefox. I think it has to do with the div "logobottom" because when I remove that div it aligns, but I need that image in there.

My css might be messy to a pro so I'd like help with my problem and if you have other suggestions for my css that would be great.

Here's the link: http://www.webdesignexpressions.com/pr/website/

Thanks a bunch!
Kim
May 2 '07 #1
6 2132
drhowarddrfine
7,435 Expert 4TB
The problem is one of organization and trying to make some of the elements behave like a table or a sliced image, which isn't necessary using CSS. You are getting confused by IE, which has difficulty handling floats properly, but there is a bit of a mish-mash going on making it hard to keep track of what belongs where. I started to get a handle on it but it's tricky and touchy.

I noticed that if 'heading', I think, is removed, the middle column is the same height as the right. This is caused by the height set on that but it, in turn is pushed down by the logobottom image, iirc. But there begins our journey.

I noticed a lot of background images but don't see where they are or what they're used for. Also, a lot of "none" attributes but, in those cases, 'none' is the default so the property isn't needed.

I think you need to sit back and re-think this so there isn't so much a cross-over of elements and this touch of 'div-itis' you may have. You may be overcomplicating things a bit and, as stated earlier, tried to make divs act like tables which is unnecessary.

Also, never use any version of IE as your test browser. It is old, buggy and non-standard. Always use a modern browser, such as anything else, but Firefox and Opera are good.
May 2 '07 #2
Thank you for your insights. I know I don't have my head around css yet. I've take several tutorials etc but it's not quite there. Do you have any good book suggestions for the "theory" side of it that you recommend. I do have a few books, including csszengarden, but haven't read them cover to cover. I've been visiting lots of sites like csszengarden as well.

I've struggled through creating a couple sites from using a css template and got it to work after much time.

On your last comment about IE, I'm not sure I understand why you suggest not testing in it since it's what the majority of people use. I use FF.

Thanks again for your time!
May 2 '07 #3
Hi drhowarddrfine,
I just wanted you to know how much your direction helped me. You are a great instructor.

I'm glad you told me that I had div-itis and that I was treating it like a table, I've evaluated some more sites at csszengarden and came up with a better layout. I'm still not sure how how to get the body to stretch vertical with my text without putting in carriage returns. Any suggestions? I'm happy with the results though. Still open to suggestions if you have them.

Here's the new link:
http://www.webdesignexpressions.com/pr/website/pr1/

Thanks again!
Kim
May 3 '07 #4
drhowarddrfine
7,435 Expert 4TB
On your last comment about IE, I'm not sure I understand why you suggest not testing in it since it's what the majority of people use.
I usually say you should not "initally test" using IE. Too many times people use IE to design and code their sites but then complain other browsers don't look the same as IE. The reason for this is IE, all versions, are riddled with bugs and quirks, don't follow the standards close enough, and is nine years behind web standards in some cases. So it is always better to check your markup using a modern browser like Firefox or Opera along with the validators to make sure your code is correct. Chances are, it will then work in ALL other browsers, including IE. However, experience has shown us that IE will frequently require tweaks and hacks to make it follow the standard.

The general mantra is, "If it works in IE but not Firefox then something is laid out or coded wrong." but "if it works in Firefox but not IE, chances are IE is the problem."

Remember that <br> is for breaking lines in a paragraph of text. If you are trying to create space between elements, the best and most controllable way is with margins and padding. Then you can control the top/bottom and sides of each element from 1px to as large as you want.

Beware of IE (again). Microsoft created the now infamous "broken box model", also referred to as 'quirks mode'. MS misinterpreted how margin/padding is applied to elements and we've been paying the price for years. Using a proper doctype, as you are doing, pulls it into "standards mode" so you don't have to worry as much about it, but IE still has issues here and there, such as bullets on <li>, where they use margin for spacing while the rest of the world uses padding.

For future reference: all new pages should use the strict doctype. Transitional is for older pages where you are still using deprecated elements and are 'transitioning' it to the modern world. New pages have no need for transitional doctypes. For fun, you could change yours to strict, revalidate and see if anything gets messed up, but it may not be worth rewriting anything just for that now.
May 3 '07 #5
drhowarddrfine
7,435 Expert 4TB
Some links I really like:
No, IE didn't handle that properly.
PositionIsEverything
Webdevout

For a real eye opener, go to webdevout (above) to see how horribly IE conforms to modern standards. It's interesting to see how many sites and articles are dedicated to 'fixing' IE6 and IE7 but there are NO sites dedicated to fixing ANY other browser.

While IE is the most used browser, you will find that, those who are technically inclined and know more of the ins and outs of the web, do not use it. And, in Europe and Australia, Firefox usage is as high as 40%. For those with international users, getting it right in non-IE browsers is more important than ever.

One last point. Chris Wilson, the lead developer of IE, wrote on his blog that IE is trying to become more standards compliant. So that means it will work more and more like modern browsers of today, like FF and Opera. Many people had their sites break when IE7 came out because IE7 is more compliant than IE6. If those sites were originally created with standards compliance, much of that breakage would not have happened. A run through of a lot of posts on forums are titled "Works in IE6 but not IE7" and vice-versa. Even more interesting are the "Works in IE7 and Firefox but not IE6".

I think this post is the start of a book.
May 3 '07 #6
Hi,
Somehow I didn't get notified of your post earlier than now. I appreciate you sharing all this info with me. I will try some of your suggestions and print your post for my reference file. Thanks!

Kim

Some links I really like:
No, IE didn't handle that properly.
PositionIsEverything
Webdevout

For a real eye opener, go to webdevout (above) to see how horribly IE conforms to modern standards. It's interesting to see how many sites and articles are dedicated to 'fixing' IE6 and IE7 but there are NO sites dedicated to fixing ANY other browser.

While IE is the most used browser, you will find that, those who are technically inclined and know more of the ins and outs of the web, do not use it. And, in Europe and Australia, Firefox usage is as high as 40%. For those with international users, getting it right in non-IE browsers is more important than ever.

One last point. Chris Wilson, the lead developer of IE, wrote on his blog that IE is trying to become more standards compliant. So that means it will work more and more like modern browsers of today, like FF and Opera. Many people had their sites break when IE7 came out because IE7 is more compliant than IE6. If those sites were originally created with standards compliance, much of that breakage would not have happened. A run through of a lot of posts on forums are titled "Works in IE6 but not IE7" and vice-versa. Even more interesting are the "Works in IE7 and Firefox but not IE6".

I think this post is the start of a book.
May 24 '07 #7

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

Similar topics

30
by: Gustaf Liljegren | last post by:
I'm working with some semi-advanced tables with lots of decimal numbers in, and I can't get the alignment to work. http://www.algonet.se/~gustafl/temp/output_ib.html I want numbers aligned to...
4
by: Mimo Zus | last post by:
I'm hoping that someone can explain what's going on; better yet provide a workaround. I'm designing a centered CSS site based on a 550 pixel wide vertical background image. Onto this background...
0
by: KPants | last post by:
I'm currently attempting to fix an issue that's been occuring with the design template I made for my Myspace... At first, it looked perfectly fine in Firefox, but in IE, everything was off the the...
2
by: cbjewelz | last post by:
Hey all. So I'm having problems with cross browser alignments. I'm looking at Safari and Mozilla Firefox. I develop in Safari and so it looks perfect there however in Firefox my vertical...
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: ...
5
by: jmcpa | last post by:
I have put together a web page for a group and I am having an alignment problem. The page is at: I have a top banner divided into two parts - a top piece and a small clice at the bottom for...
3
by: openwave | last post by:
i made the alignment for values in combo box as centered, which is taken from database. this alignment is coming centered in the browser Mozila firefox. but it is not coming centered in Internet...
7
by: komosalab | last post by:
Hi folks, I'm new to CSS and kind of lazy when it comes to coding, but I've tried to do this page by the book and it has a weird problem. I've created a table with a particular background...
1
by: buss123 | last post by:
Hi all, i am using javascript code in side to the JSP page but when i am viewing the jsp page in the browser the alignment was correct in IE but in firefox the alignmet was distubed...
2
by: Steve | last post by:
A few months ago I went to a web site that looked terrible in Firefox, but fine in IE and Opera. It turned out that because I had reset my default font size in Firefox to be larger, that my...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.