  Let $k$ be a perfect field of characteristic $p > 2$, and let $K$ be a finite
totally ramified extension over $W(k)[\frac{1}{p}]$. Let $R_0$ be an unramified
relative base ring over $W(k)\langle X_1^{\pm 1}, \ldots, X_d^{\pm 1}\rangle$,
and let $R = R_0\otimes_{W(k)}\mathcal{O}_K$. We define relative $B$-pairs and
study their relations to weakly admissible $R_0[\frac{1}{p}]$-modules and
$\mathbf{Q}_p$-representations. As an application, when $R =
\mathcal{O}_K[\![Y]\!]$ with $k = \overline{k}$, we show that every rank $2$
horizontal crystalline representation with Hodge-Tate weights in $[0, 1]$ whose
associated isocrystal over $W(k)[\frac{1}{p}]$ is reducible arises from a
$p$-divisible group over $R$. Furthermore, we give an example of a $B$-pair
which arises from a weakly admissible $R_0[\frac{1}{p}]$-module but does not
arise from a $\mathbf{Q}_p$-representation.
