I'm trying to make a table that looks like this:
But I'm not quite sure how to go about doing that.
The end result is supposed to look like this:
I was planning on having making a div, and then setting the background of the div to be the grey textured part, and then creating a table inside that div to organize the content. Is using a table in this situation correct? Or is there a better method? Thanks in advance.
Click in the table that you want to format. Under Table Tools, click the Design tab. In the Table Styles group, rest the pointer over each table style until you find a style that you want to use. Click the style to apply it to the table.
Click anywhere in the table and then go to Table Tools > Design on the Ribbon. In the Tools group, click Convert to Range. Right-click the table, then in the shortcut menu, click Table > Convert to Range. Note: Table features are no longer available after you convert the table back to a range.
Stick to a non-table markup. Best practices today would suggest you should only use tables for tabular data, and this content is not tabular data.
There's several different methods you could use to get this going, including using floats, displaying inline-block, and others. There's also considerations with the content wrapping around the images (if the content is long, for example).
But here's some sample code to get your rolling.
Styles:
div.left,
div.right {
width: 400px;
overflow: hidden; /* forces the div to clear the floated content */
}
div.left img,
div.right img {
border: 2px solid #888;
}
div.left img {
float: left;
padding-right: 20px;
}
div.right img {
float: right;
padding-left: 20px;
}
The html markup:
<div class="left">
<img src="your_image_source"><p>Lorem Ipsump dolor sit amet</p>
</div>
<div class="right">
<img src="your_image_source"><p>Lorem Ipsum dolor sit amet</p>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With