2 replies [Last post]
Balteo
Offline
Enthusiast
Paris
Last seen: 12 years 5 weeks ago
Paris
Timezone: GMT+2
Joined: 2003-06-25
Posts: 65
Points: 0

Hello,
I would like to align an element (e.g. a table) which is in a div block. I achieved it by placing a align="center" into the table tag but as far as separation of html and presentation go, it does not seem the best solution.
My page is the following:
http://www.parispano.com/index2003.cfm
The element I want to center-align is the box with rounded corners that says "buscar los anuncios" It is called .search_form in the css.
Thanks in advance,
Julien.

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 3 weeks 3 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

Horizontal-Aligning of an element contained in a div/block

Hi Baleto,
Since you know the width of search_form you should be able to set margin-left:auto; margin-right:auto;

Balteo
Offline
Enthusiast
Paris
Last seen: 12 years 5 weeks ago
Paris
Timezone: GMT+2
Joined: 2003-06-25
Posts: 65
Points: 0

Thanks for your reply

Thank you for taking the time to reply.
Julien