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

CSS issues with IE - not centering div

Hi,

I have the following web site:

http://ajmas.dyndns.org/

This displays fine in Safari and Firefox, but in IE I am having the
following issues:
- The 'content' div is not centered
- The 'page_content' div does not fill the width of the parent as it
does in the other browsers

The CSS I am using is at:

http://ajmas.dyndns.org/css/main.css

Does anyone have any ideas as to what I am doing wrong, or at the very
least what tweaks I need to get it to work in IE?

Andre

Nov 14 '07 #1
7 4023
Andre-John Mas wrote:
I have the following web site:

http://ajmas.dyndns.org/

This displays fine in Safari and Firefox, but in IE I am having the
following issues: ...
The construction of the page is out of whack. You have the contents of
the <headmixed in with the <body>. And your DOCTYPE is buried down
there as well. Fix all that, get no errors, and try again.

<http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fajmas.dyndns.org% 2F>
<http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http%3A%2F%2F ajmas.dyndns.org%2F>

--
-bts
-Motorcycles defy gravity; cars just suck
Nov 14 '07 #2
On Nov 14, 12:13 pm, "Beauregard T. Shagnasty"
<a.nony.m...@example.invalidwrote:
Andre-John Mas wrote:
I have the following web site:
http://ajmas.dyndns.org/
This displays fine in Safari and Firefox, but in IE I am having the
following issues: ...

The construction of the page is out of whack. You have the contents of
the <headmixed in with the <body>. And your DOCTYPE is buried down
there as well. Fix all that, get no errors, and try again.
I have now made changes to ensure that the doctype is included and
that it conforms to XHTML, using validator.w3.org.
After having done this my site still has issues in IE 7. Specifically
the content of the 'page_content' is not staying within its div. I
have specified the div with the following CSS:

#page_content {
float: left;
padding: 20px;
width: 660px;
voice-family: "\"}\"";
voice-family:inherit;
text-align:justify;
overflow: auto;
background-color: #ffffff;
}

It is meant to stay within the div and if there is too much horizontal
text, then it should preferbly wrap, but I would accept having scroll-
bars.

Andre

Nov 14 '07 #3
On Nov 14, 3:05 pm, Andre-John Mas <andrejohn....@gmail.comwrote:
On Nov 14, 12:13 pm, "Beauregard T. Shagnasty"

<a.nony.m...@example.invalidwrote:
Andre-John Mas wrote:
I have the following web site:
http://ajmas.dyndns.org/
This displays fine in Safari and Firefox, but in IE I am having the
following issues: ...
The construction of the page is out of whack. You have the contents of
the <headmixed in with the <body>. And your DOCTYPE is buried down
there as well. Fix all that, get no errors, and try again.

I have now made changes to ensure that the doctype is included and
that it conforms to XHTML, using validator.w3.org.
After having done this my site still has issues in IE 7. Specifically
the content of the 'page_content' is not staying within its div. I
have specified the div with the following CSS:

#page_content {
float: left;
padding: 20px;
width: 660px;
voice-family: "\"}\"";
voice-family:inherit;
text-align:justify;
overflow: auto;
background-color: #ffffff;

}
I solved the issue. The actuall CSS was:
#page_content {
float: left;
padding: 20px;
width: 660px;
//width: 100pc;
voice-family: "\"}\"";
voice-family:inherit;
text-align:justify;
overflow: auto;
background-color: #ffffff;
/*width: 480px; */
}

I thought the commented out sections weren't an issue so I omitted to
include them in my question. In fact they were the cause of the issue.
It turns out that IE7 does not support double-slash '//' comments,
where most browsers, that I have tested with, do. The result was that
IE was actually interpreting 'width: 100pc' when the other browsers
weren't. The solution was either to remove the offending entry or use
C style /* */ comments.

Andre
Nov 14 '07 #4
Andre-John Mas wrote:
I thought the commented out sections weren't an issue so I omitted to
include them in my question. In fact they were the cause of the
issue. It turns out that IE7 does not support double-slash '//'
comments,
Nor should any other browsers. Heh. After seeing the original markup, I
never got that far.
where most browsers, that I have tested with, do. The result was that
IE was actually interpreting 'width: 100pc' when the other browsers
weren't. The solution was either to remove the offending entry or use
C style /* */ comments.
...or CSS style comments. What is 100pc ?

You still have a lot of errors. Until those are fixed, all bets are off!
<http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http%3A%2F%2F ajmas.dyndns.org%2F>

--
-bts
-Motorcycles defy gravity; cars just suck
Nov 14 '07 #5
Beauregard T. Shagnasty wrote:
What is 100pc ?
Was that a trick question, or a rhetoric question? Or did you just forget
what the pc unit is? It is, after all, rarely used in www authoring, but
it's well-defined: 1pc = 12pt. Don't ask me why anyone would want to set a
width to 1200pt.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Nov 15 '07 #6
Jukka K. Korpela wrote:
Beauregard T. Shagnasty wrote:
>What is 100pc ?

Was that a trick question, or a rhetoric question? Or did you just forget
what the pc unit is? It is, after all, rarely used in www authoring, but
it's well-defined: 1pc = 12pt. Don't ask me why anyone would want to set a
width to 1200pt.
I guess it was a trick question.

--
-bts
-Oh! It's a pica!
Nov 15 '07 #7
On Nov 14, 4:25 pm, "Beauregard T. Shagnasty"
<a.nony.m...@example.invalidwrote:
Andre-John Mas wrote:

where most browsers, that I have tested with, do. The result was that
IE was actually interpreting 'width: 100pc' when the other browsers
weren't. The solution was either to remove the offending entry or use
C style /* */ comments.

..or CSS style comments. What is 100pc ?

You still have a lot of errors. Until those are fixed, all bets are off!
<http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&u...>
I never checked the CSS for validity, so I have done that now and made
the necessary changes. As to 'pc', I had thought it meant percent, but
checking this I now see it means 'pica':

http://www.w3schools.com/css/css_units.asp

Andre

Nov 19 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Jeff Thies | last post by:
I have a series of blocks that are float left that I need centered on the page. <div class="center" align="center"> <div style="width: 100 px;float: left">thumbnail 1</div> <div style="width:...
6
by: Fran¨ois de Dardel | last post by:
http://mapage.noos.fr/dardelf3/tintin/page3bits.html Can I center the series of thumbnails horizontally in the pages _and_ keep the "elastic arrangement" where the number of thumbnails adapts to...
3
by: Jonah Bishop | last post by:
I have a puzzling problem with centering text, and I'm hoping that someone here can help me out. First of all, let me state that I am using XHTML 1.0 Strict and CSS for all layout purposes (no...
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...
6
by: Axel Siebenwirth | last post by:
Hi, as described at http://www.quirksmode.org/css/centering.html, I try to do to centering with my site. I did exactly as told on that page but it only seems to center horizontally. My site...
5
by: tony.pros | last post by:
Hi, I did some "quick and dirty" use of HTML 3.2 to get some of this stuff layed out, right now I'm working on XHTML-izing it. However some other issues have arose, that I am unable to figure out...
3
by: John Pote | last post by:
1. Horizontal centering a <divin browser window. The current trend seems to be to place page content in a fixed width area in the middle of the browser window. How is this achieved? If I use a...
5
by: Markus Ernst | last post by:
Hello This is a test example: http://www.markusernst.ch/anthracite/ http://www.markusernst.ch/anthracite/living_divani.html After googling and experimenting for several hours, I ended up...
1
by: =?Utf-8?B?ZnJhbmt5?= | last post by:
Hello, I've created a table that has two rows that are span across three columns. The third row has three columns, each with an image. The last row is also span accross three columns. The span...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.