Hi,
I want to put the div in the middle of the page.
I found one:
pagetext-align: center; but work only with IE.

Recommended Answers

All 2 Replies

Hi,
I want to put the div in the middle of the page.
I found one:
pagetext-align: center; but work only with IE.

I've never seen something like : "pagetext-align: center;"
do you mean: [?]page{text-align: center} ?
Cause it should work with all current browsers. [it only centers text of its container though. ]

But if your aim is to center some element on the page but leave the text aligned on its default left, you can do something like this: elementIDorClass {margin: auto; width:40%;} you can add some background-color just to se that the element is perfectly centered. !use strict doctype.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.