Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't center children #16

Open
bernaferrari opened this issue Sep 23, 2024 · 1 comment
Open

Can't center children #16

bernaferrari opened this issue Sep 23, 2024 · 1 comment

Comments

@bernaferrari
Copy link

bernaferrari commented Sep 23, 2024

If I have the following code and I can't figure out a way where I can make a "div w-full flex items-center justify-center" equivalent on email. All I want is to have a 100% width table that takes the full available width, then use the align attribute, but it doesn't work. Is there any easy solution?

      <ResponsiveColumn
                  style={{
                    textAlign: "center",
                    backgroundColor: "red",
                  }}
                  align="center"
                >
       <table
            cellPadding="0"
            cellSpacing="0"
            border={0}
            width="100%"
            style={{ margin: "0 auto", backgroundColor: "blue" }}
          >
            <tr>
              <td align="center">
                <table cellPadding="0" cellSpacing="0" border={0}>
                  <tr>
                    <td align="center">
                      <img
                        src={src}
                        alt={alt}
                        style={{
                          width: "100px",
                          height: "100px",
                          borderRadius: "50%",                        }}
                      />
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <p> title </p>
                    </td>
                  </tr>
                </ResponsiveColumn>
image
@lordelogos
Copy link
Contributor

Hey @bernaferrari,
My sincere apologies for not seeing this sooner.
To achieve a full width table in this case, you should setup directly in the ResponsiveColumn
and use the align attribute here

if you provide a more complete code snippet, I can provide a bit more help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants