Table allignment issue on site
-
I’m having an issue with table alignment in my WordPress site. The table looks fine in the editor, but on the front end it doesn’t align properly (shifts left/right or breaks layout). I tried adjusting with CSS but no luck. Has anyone faced this issue and how did you fix it?
-
Yes, this is a pretty common WordPress quirk — the editor shows tables neatly, but the theme’s front-end CSS often overrides them. The usual fix is to give your table its own CSS class and style it directly, for example:
.my-table {
margin: 0 auto; /* centers the table / width: auto; / prevents forced stretching / border-collapse: collapse; } .my-table td, .my-table th { padding: 8px; text-align: center; / adjust as needed */
}
- The topic ‘Table allignment issue on site’ is closed to new replies.