kameron.design

Code Snippets

fix horizontal scrolling

css

				
					html, body {
overflow-x: hidden;
}
body {
position: relative;
}
				
			

dynamic year (for footer)

php

				
					function year_shortcode() {
  $year = date('Y');
  return $year;
}
add_shortcode('year', 'year_shortcode');
				
			
				
					2022
				
			

media queries

css

				
					/* Extra small devisces (phones, 600px and down) */
@media only screen and (max-width: 600px) {...}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {...}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {...}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {...}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {...}

/* Between Screen Widths */
@media all and (max-width: 699px) and (min-width: 520px), (min-width: 1151px) {
}
				
			

style gravityforms password strength

css

				
					.gfield_password_strength.short {background-color: #e3e3e3 !important;}
.gfield_password_strength.bad {background-color: red !important;}
.gfield_password_strength.good {background-color: yellow !important;}
.gfield_password_strength.strong {background-color: green !important;}
				
			

smooth scrolling

css

				
					html {
  scroll-behavior: smooth;
}
				
			

dynamic back button

html

				
					<button type="button" onclick="history.back();" class="back-button">< Back </button>
				
			

make row contained within full-width section

css

				
					selector {
		max-width: 675px; 
		margin-left: auto;
	}
				
			

fix elementor button wrap

css

				
					.elementor-element-085dacb .elementor-button .elementor-button-text {
   display: inline-block;
   float: left;
   width: 89%;
   text-align: left;
}
.elementor-element-085dacb .elementor-button-link.elementor-button.elementor-size-sm {
   width: 100%;
}
				
			

define font family

css

				
					body { font-family: 'Droid Serif', serif; }
				
			

comments

css

				
					/*
  This is a 
  comment in CSS
*/