# Equivalent of css “position: relative” to move slighty a graphic

I have a header with two columns; On the first column, I have an image (the logo) and I would like to slightly adjust its position. Here is the relevant piece of code:

\fancyhead[LE,LO]{\tt\begin{multicols}{2}\includegraphics[scale=0.5]{logo.eps}\vfill\columnbreak some more text...\end{multicols}}


Is it possible to move a little bit to the top/left my image?

here is a minimal working example:

\documentclass[a4paper,11pt]{article}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{multicol}
\pagestyle{fancy}
\setlength\topmargin{2cm}
\setlength\oddsidemargin{2cm}
\setlength\textheight{200 mm}
\setlength\textwidth{17cm}
\begin{document}
some content
\end{document}


thanks

-
I don't think that multicols is the best way to do this; how should the picture be in relation to the side text? –  egreg Feb 15 '13 at 14:39
my design is based on a grid that's why I used multicols. I'm open to other suggestions if multicols is a problem. Thanks –  Alex Feb 15 '13 at 14:41
Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out possible solutions when we see compilable code, starting with \documentclass{...} and ending with \end{document}. For the logo, just approximate dimensions are sufficient. –  egreg Feb 15 '13 at 14:45
Here it the minimal working example! –  Alex Feb 15 '13 at 15:44
Where should the image be placed? Slightly higher and a bit offset into the left margin? Do you need the rule below the header? –  egreg Feb 15 '13 at 15:55

multicols is not the best for a header; I suggest using a tabular; moreover, geometry makes defining page dimensions easier.

\documentclass[a4paper,11pt]{article}
\usepackage[
top=1cm, % top margin
left=2cm, % left margin
textwidth=17cm,
textheight=20cm,
heightrounded, % to have an integer number of lines
]{geometry}

\usepackage[demo]{graphicx}

\usepackage{url}    % for demonstration purposes
\usepackage{lipsum} % mock text

%% Define the text in the header
The name of the firm\newline
\url{http://firm.com}
}

\usepackage{fancyhdr}
\pagestyle{fancy}
%% assuming the width of the logo is 4cm, we put it 1cm left in the margin
%% and we cut 3cm (width - offset) from the remaining space, for the text
\hspace*{-1cm}\begin{tabular}{@{}lp{\dimexpr\textwidth-3cm-2\tabcolsep}@{}}
\raisebox{\dimexpr-\height+\ht\strutbox}{\includegraphics[height=3cm,width=4cm]{logo.eps}}
\end{tabular}%
}

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


It's not difficult to separate more the logo from the header text

-
thanks a lot for your answer. Could you explain the meaning of @{}lp{\dimexpr\textwidth-3cm-2\tabcolsep}@{}? (I mean especially the @{}lp{}@{} structure) –  Alex Feb 16 '13 at 23:15
p{<dimension>} states that the column is a "paragraph" column. I set it to be as wide as the \textwidth minus the offset for the logo and the intercolumn space (between the first and second column it is 2\tabcolsep. With @{} at the sides I announce that I don't want the padding LaTeX usually adds at the sides of a tabular. –  egreg Feb 16 '13 at 23:17
thanks egreg. \raisebox{\dimexpr-\height+\ht\strutbox} seems to correct the vertical alignement of the second cell text, but it does not seem however to move up the graphic. Do you have any idea? –  Alex Feb 17 '13 at 0:02