471,598 Members | 1,186 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,598 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 3996
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Jeff Thies | last post: by
6 posts views Thread by FranŤois de Dardel | last post: by
3 posts views Thread by Jonah Bishop | last post: by
15 posts views Thread by red | last post: by
6 posts views Thread by Axel Siebenwirth | last post: by
5 posts views Thread by tony.pros | last post: by
3 posts views Thread by John Pote | last post: by
5 posts views Thread by Markus Ernst | last post: by
1 post views Thread by =?Utf-8?B?ZnJhbmt5?= | last post: by
2 posts views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

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.