responsive-email icon indicating copy to clipboard operation
responsive-email copied to clipboard

Can't center children

Open bernaferrari opened this issue 4 months ago • 0 comments

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

bernaferrari avatar Sep 23 '24 21:09 bernaferrari