Here's one possible solution using the background package:

\documentclass{article}
\usepackage{background}
\usepackage{lipsum}

\newlength\mylen
\setlength\mylen{\dimexpr\paperwidth/40\relax}

\SetBgScale{1}
\SetBgAngle{0}
\SetBgColor{blue!30}
\SetBgContents{\tikz{\draw[step=\mylen] (-.5\paperwidth,-.5\paperheight) grid (.5\paperwidth,.5\paperheight);}}

\begin{document}
\lipsum[1-20]
\end{document}




And here's an adaptation for TikZ of the code found here, for the case of minipages; the main environment is gridmp with an optional argument (the color for the rules) and a mandatory argument (the  width of the minipage):

\documentclass{article}
\usepackage{tikz}
\usepackage{lipsum}

\newcommand\MyGrid[3]{%
  \begin{tikzpicture}[remember picture,overlay]
    \draw[step=3mm,color=#1] (0,0) grid (#3,#2);
    \draw[color=#1] (0,#2) --  (#3,#2);
  \end{tikzpicture}%
}

\newlength\MaxHt
\newsavebox\mybox

\newenvironment{gridmp}[2][lightgray]
  {\def\mycolor{#1}
    \begin{lrbox}{\mybox}%
      \begin{minipage}{#2}}
  {\end{minipage}%
   \end{lrbox}%
   \setlength\MaxHt{\dp\mybox}\addtolength\MaxHt{1.1\ht\mybox}
   \noindent%
   \raisebox{-\dp\mybox}{\MyGrid{\mycolor}{\MaxHt}{\wd\mybox}}%
   \usebox{\mybox}
   \vspace{0.5cm}}

\begin{document}

\begin{gridmp}{\linewidth}
\lipsum[2]
\end{gridmp}

\begin{gridmp}[blue!30]{\linewidth}
\lipsum[2]
\end{gridmp}

\begin{gridmp}[green!30]{\linewidth}
\lipsum[2]
\end{gridmp}

\end{document}




Making a checkered background for a page
In a MathOverflow comment on the question of "What is the most useful non-existing object of your field?", an answer is given


  A number which is less than 1 and greater than 1.


Which elicited a highly upvoted reply


  Integers (strictly) between 0 and 1 form the basis of transcendental number theory.


What does this mean? Is there a different, more relaxed, definition of an integer used for transcendental number theory?
