473,406 Members | 2,745 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,406 software developers and data experts.

IE not showing divs properly centered

3
With some help from a friend I made a layout for this website:

http://jwstolk.xs4all.nl/roelof/ (don't mind all the unfinished junk, the home page is of concern)

In FF 3 it shows just fine, but when I test it in IE 6 the divs with text don't center. I read about using text align:center; becuase IE doesn't support auto margins, but I don't want my text to center. I want it to align on the left of my div, and get the whole div centered.

I hope that made any sense, most of my work is done by trial and error, thanks in advance!

PS: the navigation banner is currently made with tables, I tried using divs but couldn't get the positioning to work, is it even possible to do with divs or should I just leave stuff that works alone.
Aug 6 '08 #1
5 1769
drhowarddrfine
7,435 Expert 4TB
You will never get IE to attempt to perform like modern browsers without a proper doctype. See the article about doctypes under Howtos above.
Aug 6 '08 #2
warp
3
Ah thank you very much!, i never understood the use of these doctypes now I do:) I added html 4.1 strict and it solved the problem.

BUT, now my navigation banner isn't showing up the way it should in FF. Obviously this has to do with me using tables, but I failed to get it working in divs, I tried all sorts of positioning, but it didn't work, could this have to do with the javascript inside of it?
Aug 6 '08 #3
drhowarddrfine
7,435 Expert 4TB
Ah thank you very much!, i never understood the use of these doctypes now I do:) I added html 4.1 strict and it solved the problem.

BUT, now my navigation banner isn't showing up the way it should in FF. Obviously this has to do with me using tables, but I failed to get it working in divs, I tried all sorts of positioning, but it didn't work, could this have to do with the javascript inside of it?
I would be you used IE to initially create this page. All versions of IE are 10 years behind web standards. Never, ever use IE to do anything. Always use a modern browser like FF/Opera/Safari to test your page. Then look to see if IE screws it up. If so, its bugs are known as are the hacks to fix it.

I'll try and look at this for a minute.
Aug 6 '08 #4
drhowarddrfine
7,435 Expert 4TB
Unless your js is setting margin values it shouldn't. You do need to validate your html for that list of errors. Otherwise, check margin/padding and use FF to make adjustments. IE is not showing what you wrote.

The mantra is, if it works in IE but not FF then there's something wrong with the markup. If it works in FF but not IE, it's an IE bug.
Aug 6 '08 #5
warp
3
I rebuild it from the ground up in FF and it works now, turns out I messed something up with my absolute placement. Thanks for your help in answering my questions!
Aug 6 '08 #6

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

Similar topics

3
by: Chris | last post by:
Hi, I am pretty new to CSS authoring and find myself in a tricky situation. I have a series of divs (dynamically generated - there could be up to 8) as follows: <div class="person">...
0
by: Sue Thackston | last post by:
My first layout. I've got 2 divs, side by side, wrapped in a centered div with a border. I don't want to use a float to get the aforementioned divs to work side by side, so to get this to work, I...
20
by: Tyler Carver | last post by:
I would like to do something that seems so basic with two div's but I don't think it can be done. Tables can do it in a snap. I was convinced that css was the way to go for layout but without...
2
by: David Winter | last post by:
This is a totally trivial CSS problem, I'm sure, but I don't get it. I want a centered DIV with a fixed width between two other DIVs that should fill the rest of the window/viewport (= 100%). How...
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...
15
by: red | last post by:
How do I center two side by side divs ? I've been writing css pages for a while but there's one thing tha still eludes me. I can center a div with margin auto. I can place two divs side by side...
1
by: Simon Dean | last post by:
Dougie Howser! Anyone got any good tips or links to suitable guides/tutorials? Coming from tables, I now realise the abomination that they were. Though I do enjoy being able to do say: ...
1
by: judacris | last post by:
I've seen the threads here about molding 2 divs in a centered fashion. but I can't seem to solve this thing. my blogger blog is functioning well on my site for now, but the blog feed (left) and...
18
by: maya | last post by:
pls look @ this pg, http://www.mayacove.com/design/divs.html in IE and FF.. in IE it looks fine, but in FF the main div (centered, 800px wide, blue background; in reality the bg will be white..)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
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,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.