What is the equivalent in css of the html center tag? (For images and text). I know you can line up the image or text with x/y coordinates but it doesn´t exactly centrally line up, specially when browser resolution varies.
@fredmvMay 11.2004 — #Good call Vlad. Though I suggested the above because [font=courier]<center>[/font] also centers block-level elements as well as text. So I guess what you're looking for, ideally, is both.
@Ben_RogersMay 11.2004 — #Also, margin: auto; for DIVs will set the margins on either side to their maximum value, creating effective centering in most cases.
@VladdyMay 11.2004 — #[i]Originally posted by fredmv [/i]
[B]Good call Vlad. Though I suggested the above because [font=courier]<center>[/font] also centers block-level elements as well as text. So I guess what you're looking for, ideally, is both. [/B][/QUOTE]
He was asking for "images and text" that are inline elements by default - therefore my answer.
I do not think a "universal solution" is the best one. I prefer "divide and conquer" approach:
inline elements: use text-align: center on parent;