• 0

HTML 4.01 Validation


Question

W3C Validator with my page

I've almost reached my goal (XHTML could be the next one).

How can I correct this problem? I've tried to play with <p> with no succes.

Edit: How can I center my table without using aling="center" or <center> </center>?

Thanks,

Edited by JMA_PN
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Well the "easist" way would be to wrap the table in a div and assign the div an ID or a class. In your CSS file you will need to set the following styles:

body {

text-align: center;

}

#wrapper {

margin-left: auto;

margin-right: auto;

width: [whatever your desired width is]

text-align: left;

}

The div in this example has an id of "wrapper". You can also specify top and bottom margins if you so desire.

Link to comment
Share on other sites

  • 0

Site seems to be down now or I just can't get to it, however as long as the ID is specified correctly, it does not matter if it has the same name as a tag.

In the HTML the correct way to specify an ID is <tag id="idname">, while in CSS it is #idname { }.

Not entirely sure who's code you were referring to zivan, but as long as he is not actually placing a tag inside a tag (<tag <tag/>></tag> as opposed to <tag><tag /></tag>), there should not be any problems in that regards.

Link to comment
Share on other sites

  • 0

The centering work fine under IE but under Opera 7.10 nothing changed exept that all my text are now centered... :\ I've corected that by assigning a "left" value to all my CSS entries for text.

Link to comment
Share on other sites

  • 0

Hrm. Assigning a "left" value for text-align in the DIV should have countered the "center" text-align in the body, as it should propagate downward (cascade).

There is a "fix" for Opera when centering content on the page, however it escapes my memory right now (there is a way that I know of off-hand, however it requires specifying right and left margins in percentages).

As the page you have online does not include the changes I suggest I cannot tell you where something may be messing up at.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.