Main.css file overrides the child theme's Style.css

By UUA Web Team
August 13, 2016, 1:55 pm EDT

I have installed and activated a child theme but the css (main.css) from the original theme overrides the child theme css (style.css) instead of the other way around. This is the code in my functions.php file. It is straight from WP Codex.

<?php
function my_theme_enqueue_styles() {
$parent_style = 'parent-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ), wp_get_theme()->get('Version') );
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>

When I inspect the element I'm trying to change the size or color, etc., the change from 'style.css' is crossed out and the styles from 'main.css' continue to prevail. Does the above php load the stylesheets in the proper order? Any ideas? Thank you.