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

Divs in IE and Firefox

Hello,

We have a classic problem concerning DIV positioning in Firefox.

We had a tool's UI designed with DIV elements inside a table. It looks OK in IE but completely out of whack in Firefox.

You can see it here and compare the rendering by the 2 browsers (the tool is in the blue table on the right):
http://www.sweetartsdesign.com.ws026.alentus.com/200WebSite/indexb.html

This is what we are trying to do - we need to keep the same table's total height but:
1) Make the 3rd area (name area) look better when minimized. There's a light blue gap at the bottom but we'd like only a 1 pixel thick line, as the ones that separate the other areas above (letter and design areas)
2) Have the whole tool's UI in Firefox match the one in IE

Do you have any tips?

Thanks!
Sep 22 '07 #1
7 1758
Your link (http://www.sweetartsdesign.com.ws026.alentus.com/200WebSite/indexb.html) doesn't work.
Sep 22 '07 #2
Your link (http://www.sweetartsdesign.com.ws026.alentus.com/200WebSite/indexb.html) doesn't work.


Oops.

http://www.sweetartsdesign.com.ws026.alentus.com/2007WebSite/indexb.html
Sep 22 '07 #3
drhowarddrfine
7,435 Expert 4TB
We have a classic problem concerning DIV positioning in Firefox.

We had a tool's UI designed with DIV elements inside a table. It looks OK in IE but completely out of whack in Firefox.
Then the problem is IE not Firefox.
Neither link you provide works.

Do you have any tips?

Thanks!
Never, ever use IE as a reference browser. It is nine years behind web standards and buggy. Always, always use a modern browser as your test/reference, such as Firefox or Opera. The hacks to make modern code work in IE are known and available. Until you give us a working link, however, we will be unable to help.
Sep 22 '07 #4
I'm assuming you're using IE 7. The select fields look wrong in Firefox because Firefox correctly followed the rules in your CSS.

If you want to change the height of a select field use the size attribute instead. For instance:

[HTML]
<select size="3">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
[/HTML]

This will typically give you better results across browsers than using either pixels or ems.
Sep 23 '07 #5
drhowarddrfine
7,435 Expert 4TB
The second link works now. You have a classic problem concerning DIV positioning in IE. You have no doctype which puts IE into 'quirks mode' and it uses its broken 'box model'. To try and get IE to pretend it's a modern browser like Firefox, add a 'transitional' doctype as mentioned in the article about doctypes under Articles at the top of this page. You need the 'transitional' doctype because your markup is made of many deprecated elements.

Validate your code for your list of 36 html errors that need fixing. I did not check for CSS errors so you should validate for that list, too.

Then do any adjustments while testing in a modern browser like Firefox or Opera or Safari. Then look at IE so you can hack it for its many quirks and bugs. IE6/7 is nine years behind web standards but its bugs are known as well as the fixes.

After all that, if you need help fixing IE, please feel free to ask more questions.
Sep 23 '07 #6
Thanks, booneyHill and drhowarddrfine
Sep 23 '07 #7
Just a tip if you have problems fixing issues in IE you can do a conditional if statement that only IE understands like below:

This applys to all IE browsers.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <!--[if IE]>
  3.  <link href="/css/ieonly.css" rel="stylesheet" type="text/css" />
  4. <![endif]-->
  5.  
  6. <!--[if IE 5]>
  7. <p>This message is only displayed in IE5.</p>
  8. <![endif]-->
  9.  
  10. <!--[if !IE 5]>
  11. <p>This message is only displayed in browsers other than IE5.</p>
  12. <![endif]-->
  13.  
  14. <!--[if lt IE 7]>
  15. <p>This message is only displayed in browsers earlier than IE7.</p>
  16. <![endif]-->
  17.  
  18. <!--[if gte IE 6]>
  19. <p>This message is only displayed in IE6 and greater.</p>
  20. <![endif]-->
  21.  
  22.  
I think its a far better approach than using Hacks, but thats my personal point of view but some people may differ.

Tom
Sep 23 '07 #8

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

Similar topics

2
by: Egon Pasztor | last post by:
Hi. I'm new at CSS, so maybe this is obvious, but I've looked around quite a bit looking for a solution. I'm playing with the vertical positioning of elements in a 2-column layout. The...
26
by: Spondishy | last post by:
Hi, I have a problem with divs and padding in IE6 and Firefox. Basically my example that I have attached works exactly how I want in IE6, but padding is treated differently in Firefox. My...
1
by: gforce | last post by:
i'm doin the html/css for a web project and i'm having some trouble now that the back end programmers are adding dynamic data... at least that's what i'm being told. there seem to be two major...
5
by: gregmercer | last post by:
I have the following html sample, where I'd like to have a show and hide two divs, one replacing the other. Following these two divs is a third div (the bluediv) which I would like to have placed...
12
by: meltedown | last post by:
I would like the floating divs to float and then the header to come after them , on the left. That's what I thought clearing the floats was for, but in this example, the header is to the right of...
2
by: tasman.hayes | last post by:
I'm experimenting with converting a site from a table layout to CSS. I'm floating three DIVs in a row for the top of a website (a logo, navigation buttons and a email list signup box). The DIVs...
2
by: Ben Wall | last post by:
I have a page with six or seven absolutely positioned DIV blocks ... they all contain form elements .. text boxes, buttons, etc. and they all reside within a containing "master" DIV. What I need to...
19
roula
by: roula | last post by:
I HATE DIVS AND DIFFERENT BROWSERS!!! i spent the whole day and night searching for a way to center align stupid divs, the problem is that the code is so sensitive, i lost my mind trying to make them...
4
by: Adam | last post by:
I have four roughly square DIVs, all the same height, which I need to line up horizontally across the page. What would be the best way to do this? At the moment I have a very botched solution where...
3
by: useenu | last post by:
Hi all, I am new to this forum and javascript. I am developing a progress bar in javascript. For that I planned to have series of small DIVs in a big DIV. I have written a below function.It is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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:
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...

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.