Background Repeat

CSS Tutorial


Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2298

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2302

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2308

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2312

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2316

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2320

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2334

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2298

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2302

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2308

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2312

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2316

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2320

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2334

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2298

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2302

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2308

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2312

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2316

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2320

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2334

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2298

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2302

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2308

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2312

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2316

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2320

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2334

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2298

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2302

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2308

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2312

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2316

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2320

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2334

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2298

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2302

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2308

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2312

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2316

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2320

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2334

CSS Advanced


Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2298

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2302

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2308

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2312

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2316

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2320

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2334

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2298

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2302

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2308

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2312

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2316

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2320

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2334

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2298

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2302

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2308

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2312

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2316

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2320

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2334

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2298

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2302

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2308

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2312

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2316

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2320

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2334

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2298

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2302

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2308

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2312

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2316

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2320

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2334

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2298

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2302

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2308

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2312

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2316

Notice: Trying to get property 'post_status' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2320

Notice: Trying to get property 'ID' of non-object in /home/u212091429/domains/mydevhelp.com/public_html/wp-admin/includes/template.php on line 2334

CSS Responsive

CSS Grid

Background Images Repeat

The background-image property by default repeats an image both horizontally and vertically.

Some images must be repeated only horizontally or vertically, or they will appear strange, like this:

HTML
				
					<h1>Hello World!</h1>
<p>This is background repeat.</p>
				
			
CSS
				
					body {
  background-image: url("gradient_bg.png");
}

				
			

Output

background-repeat

If the image above is repeated only horizontally (background-repeat: repeat-x), the background will look better.

repeat-x:

CSS
				
					body {
 background-image: url("gradient_bg.png");
 background-repeat: repeat-x;
}

				
			

Output

background repeat-x

no-repeat:

CSS
				
					body {
 background-image: url("gradient_pink.png");
 background-repeat:no-repeat;
}

				
			

Output

background no-repeat

Background Position

HTML
				
					<h1>Hello World!</h1>
<p>Set background to top right using position</p>
				
			
CSS
				
					body {
  background-image: url("img_tree.png");
  background-repeat: no-repeat;
  background-position: right top;
  margin-right: 200px;
}

				
			

Output

background position

Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home/u212091429/domains/mydevhelp.com/public_html/wp-includes/functions.php on line 5420

Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home/u212091429/domains/mydevhelp.com/public_html/wp-includes/functions.php on line 5420