The gap is necessary because dishwashers create a lot of heat and humidity. It can damage the counters to be exposed to these elements too closely. Most manufacturers recommend a gap of 1/2-3/4 of an inch.
While your dishwasher does not have to be flush with the cabinets and countertops, there are benefits to the parallel installation. A flushed dishwasher makes it easier to maneuver through your kitchen, creates a cohesive look within the space, and prevents unanticipated plumbing challenges.
You will need to purchase a pre-finished cabinet frame filler. They typically come 3" wide x 36" long. The dishwasher must be removed, the filler installed and attached to the cabinet and the the dishwasher installed mounting to the filler.
Make sure there is at least 27 inches of open space in front of the dishwasher for loading and unloading.
Ideally, a dishwasher should stick out 1.5″ from the counter. In the case of the top controller dishwasher, it sticks out 2-3″.
Many dishwashers have 1/2" - 3/4" gap or clearance to the counter top. This is not unusual. Many manufacturers require a certain amount of "clearance" to the top of the counter top/sides of the cabinets due to heat and humidity that comes of the machine.
Just get it in a spray can at the hardware store and spray into the gap. It will then expand to fill the hole. Once it is dry you can clean it up a bit to be more presentable with a hacksaw blade. This method will only work for small-sh gaps though.
All appliances including ranges, refrigerators, dishwashers and microwaves need to be in place prior to installation process. After installation of countertops, final wall preparation can begin. Do not paint, tile or wallpaper areas above countertops prior to installation.
Please note that countertops are usually installed at the end of any remodeling, so if you're purchasing new flooring, appliances or cabinets, those things should be installed first.
After Your New Countertops are Installed
For best results, it's generally recommended to wait 24 hours after countertop installation before setting up the sink. (Make sure to have a backup plan to keep your bathroom or kitchen supplied with water for those 24 hours.)
Apply a bead of silicone caulk or construction adhesive along the top edge of all the cabinet parts that support the countertop. Tip up a straight countertop to apply the adhesive. Insert shims under a mitered countertop rather than trying to tip it up — doing so is easier and is less likely to break the glue joint.
The vast majority of undercounter dishwashers measure approximately 24 inches in width, 24 inches in depth and 35 inches in height with adjustable feet. This means that the rough opening in your cabinets must be 24- by 24- by 35-inch.
Measure from the floor of the opening in which the dishwasher will be installed to the lowest point of the countertop. Most dishwashers require a 34 1/2–36-inch tall opening.
You can determine how deep your dishwasher can fit within your cabinet opening by measuring the depth from the back wall toward the front of your cabinets. When narrowing down your dishwasher purchase, be sure to mind any protruding handles (namely bar handles), as these should extend beyond the front of your cabinets.
It's true, most dishwashers are the same size, and the standard size of a dishwasher is 24 inches wide by 35 inches high by 24 inches deep. But unless you measure your dishwasher's existing space, also called a rough opening, you'll have no idea whether or not your designated spot will fit that size.