# How can I move my table on top of the page?

How can I adjust my table on the top of the page? I want to move slightly my table on top. Should I use some margin or padding command in order to that?

\documentclass[english,a4paper,12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{listings}
\usepackage{changepage}

\begin{document}

\clearpage
\begin{table}[ht]
\begin{tabular}{|p{.6\textwidth}|p{.75\textwidth}|}
\hline
{\begin{lstlisting}[basicstyle={\scriptsize\ttfamily},
identifierstyle={\color{black}},
tabsize=2,language={Java},
numbersep=8pt,numbers=left,xleftmargin=0.5cm,frame=tlbr,framesep=2pt,framerule=0pt,
morekeywords={class,run}]
void run(Dummy x) {
out.println("Hello world")
}
}
class X ext ProxifiedObject {
void main(X x) {
}
}
\end{lstlisting}}
&
{\begin{lstlisting}[
basicstyle={\scriptsize\ttfamily},
identifierstyle={\color{black}},
tabsize=2,
language={Java},
numbersep=8pt,
numbers=left,
xleftmargin=0.5cm,frame=tlbr,framesep=2pt,framerule=0pt,
morekeywords ={class,run}
]
void run(Dummy x) {
out.println("Hello world")
}
}
class X ext ProxifiedObject {
void main(X x) {
}
}
\end{lstlisting}}
\\
\hline
\end{tabular}
\caption{\label{fig:text}text experiment ent experiment experiment}
\end{table}
\end{document}


-
It is at the top: i.stack.imgur.com/ODg90.png If you want it to go up further, you have to reduce the top margin. –  Harish Kumar Mar 31 at 23:33
You can move it by little if you use aboveskip=0pt for listings. –  Harish Kumar Mar 31 at 23:39

After examining my own post, I found out a way to move the table on top of the page.

The command vspace simply solves my problem.

\begin{table}[ht]
\vspace{-7.5em}%
.....
\end{table}

-

Or notice [ht] after \begin{table}. The t stands for top (h for here). So, if you only write \begin{table}[t]...and the rest... the table should go to the top of the page.

-