Giel
Giel

Reputation: 311

Create two columns in html or php

I'd like to make 2 column filled with data on the woo commerce single product page. I have these lines of code

Audiofiles: 
<?php

echo get_post_meta( $post->ID, '_text_field_audiofiles', true );
?>
<BR>
Format: 
<?php
echo get_post_meta( $post->ID, '_text_field_format', true );
?>
<BR>

Bitrate: 
<?php
echo get_post_meta( $post->ID, '_select_bitrate', true );
?>
<BR>

Samplerate:
<?php
echo get_post_meta( $post->ID, '_select_samplerate', true );
?>

Using columns would be prettier because the columns would align the text. Any help is greatly appreciated!

Upvotes: 1

Views: 79

Answers (1)

DamiToma
DamiToma

Reputation: 1106

<table style="width:100%">
<tr style="height:50px">
<td style="width:50%;height:50px">
<?php
echo get_post_meta( $post->ID, '_text_field_audiofiles', true );
?>
</td>
<td style="width:50%;height:50px">
<?php
echo get_post_meta( $post->ID, '_text_field_format', true );
?>
</td>
</tr>
<tr style="height:50px">
<td style="width:50%;height:50px">
<?php
echo get_post_meta( $post->ID, '_select_bitrate', true );
?>
</td>
<td style="width:50%;height:50px">
<?php
echo get_post_meta( $post->ID, '_select_samplerate', true );
?>
</td>
</tr>
</table>

Upvotes: 2

Related Questions