This is a discussion on "Vertical alignment issues in IE6. IE7 Won't center my page!" within the Web Page Design section. This forum, and the thread "Vertical alignment issues in IE6. IE7 Won't center my page! are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Vertical alignment issues in IE6. IE7 Won't center my page!
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Vertical alignment issues in IE6. IE7 Won't center my page!
Hello!
I've been working on this Design for a while (I know some of my problems have been brought up in another thread, for that I apologise! I've searched all over the forums and google for solutions to my issues with little luck (I'm sure the answers are out there, but I can't find them!) First the IE 6 problems!
http://www.tourismaccreditationvic.c...ainLayout.html My CSS files can be viewed here - http://www.tourismaccreditationvic.c...css/Styles.css http://www.tourismaccreditationvic.c...sv/css/ie6.css And finally my java can be viewed here - http://www.tourismaccreditationvic.c.../hovermenus.js Thanks in advance for all the help. The last few weeks using this forum have really helped me learn a lot and I hope soon I will be able to start contributing answers rather than questions! |
|
|
|
#2
|
||||
|
||||
|
Re: Vertical alignment issues in IE6. IE7 Won't center my page!
The script for the menu is being ignored by IE7 because you are using this conditional comment:
<!--[if IE 6]> The page isn't centered "probably* because you have this: html,body{ margin:auto; } Try: html,body{ width:960px; margin:auto; }
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
|
#3
|
|||
|
|||
|
Re: Vertical alignment issues in IE6. IE7 Won't center my page!
Hrmm...
The centering thing didn't seem to work. I already had the width in the code, it was just the order that I've changed. Before it was html, body { margin:auto; padding:0; width:960px; } Now it's html, body { width:960px; margin:auto; padding:0; } But it doesn't seem to fix it. However the Menu's are now working in IE7. Thanks. |
|
#4
|
|||
|
|||
|
Re: Vertical alignment issues in IE6. IE7 Won't center my page!
What you need to do to align your container on the viewport FOR I.E is put text-align:center; for body. Then put a text-align:left; in your main container to align its contents to left
|
|
#5
|
|||
|
|||
|
I have been teaching (X)HTML and CSS online for almost 3 years now. One thing I teach all my students is not to create websites with content areas any wider than 786px. Why? If you have visitors to your site who are using an 800 X 600 screen resolution, anything wider than 800px will create a horizontal scroll bar at the bottom of the browser window, but it still leaves a few pixels of margin on either side of the content area in the browser window.
People do not mind scrolling down a page, but scrolling across to read every line on the page ticks them off. Here is how I lay out my CSS Stylesheets:
Here's a single column website using basically the above CSS, but with more classes for presentation etc. http://militaryarts.kr I hope you found this basic information helpful towards getting your website up and running. To your Health, Wealth, and Success. ClaireP Last edited by Aso; Mar 23rd, 2008 at 11:05. Reason: Use BBcode |
|
#6
|
|||
|
|||
|
Re: Vertical alignment issues in IE6. IE7 Won't center my page!
Two things - firstly not all browsers read vertical centreing, can't remember which one it is (Safari?) but one will mess your page up with vertical centreing. Horizontal is cool however.
As pointed out above you need the text-align : left in the wrapper/container and text-align : center for the body. You'll need a wrapper div to act as a container something like below - /*wrapper centres page*/ #wrapper { margin : 3px auto 0 auto; padding : 0 0 0 0; width : 876px; height : 570px; background-color : #cccccc; text-align : left; } Here's a good link http://www.bluerobot.com/web/css/center1.html Good luck Hi Claire - Still working to 800*600!!!! Even the BBC and my useability/accessibility obsessed tutors last year (and I mean completely obsessed) have moved to 1024*768 now...my site logs show under 0.5% of users in 800*600 - time they moved on? Or learnt to increase text size or bought glasses ;-0 |
![]() |
| Tags |
| center my webpage, css boxes |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| <form> tag in <table> is causing alignment issues - HELP! | Love2Java | Web Page Design | 5 | Sep 4th, 2007 15:27 |
| How to center a page without use of a table | pdk | Web Page Design | 23 | Jan 31st, 2007 11:28 |
| :: Dreamweaver :: Vertical Alignment | LittleDoug | Web Page Design | 4 | May 22nd, 2006 16:40 |
| Vertical Table Alignment | Amphersand | Web Page Design | 6 | Mar 13th, 2006 01:34 |
| Alignment Issues | everlonggg | Web Page Design | 10 | Mar 9th, 2006 21:16 |