473,499 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4026
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
15031
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
1933
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
7343
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
13479
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
2026
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
1558
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
4187
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
4807
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
2270
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...
0
7132
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
7009
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
7178
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,...
1
6899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7390
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5475
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
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.