# Exact paragraph style to set in LaTeX? [closed]

How can I set a different padding value for each side? I want a result that corresponds with this HTML/CSS configuration:

<html>
<style>
div {
background: #444;
color: white;
}

}
</style>
<body>
Top: 10px; bottom: 0px<br>
Left: 5em; right: 0px
</div>
</body>
</html>


What is the exact paragraph style to set in LaTeX?

\documentclass{article}
\usepackage{fontspec}
\usepackage{fancyhdr}
\usepackage{multicol}
\pagestyle{plain}\pagestyle{fancy}

\begin{document}
\thispagestyle{empty}

\end{document}

• I think you need to read The not so short introduction to LaTeX. It's clear from this question that you don't really understand how LaTeX works. Aug 8, 2011 at 10:01
• Can you show us some attempt you've made in achieving this configuration? Is there something in particular you're struggling with? This Q&A site is about solving problems, not about having other people do your work (even though sometimes it seems tex.sx users will do anything as long as it is about TeX). If you don't know at all how to go about changing this, I second Seamus' recommendation to read some introductory text on LaTeX. Aug 8, 2011 at 10:53
• The upcoming version of adjustbox provides a \marginbox{<llx> <lly> <urx> <usry>}{..} macro which can be used to add the padding. Also have a look on the mdframed or the older framed package. But LaTeX and HTML/CSS work under complete different principles, so a little more context would help understanding your needs. Aug 8, 2011 at 10:54
• For code blocks, every line needs to be preceded by four spaces. The easiest way to do this is to select the code and press the {} button.
– Jake
Aug 9, 2011 at 6:20

I give you a template that simulates your HTML but it is not so similar. :-) Adjust it gradually while you are learning TeX and getting familiar with it.

\documentclass[dvipsnames,rgb]{article}
\usepackage{xcolor}
\usepackage
[
paperwidth=1024pt,
paperheight=768pt,
left=60pt,
right=60pt,
top=60pt,
bottom=60pt
]{geometry}

\pagecolor{Yellow!50}% page color
\color{Maroon}% text color

\usepackage{lipsum}%dummy text

\usepackage[demo]{graphicx}% import graphics

\begin{document}
\section{Introduction to \LaTeX}
\lipsum[1]
$E\not=mc^2$
\lipsum[2]
\begin{figure}[hbtp]
\centering
\includegraphics[width=0.5\linewidth]{foo}
\caption{Dummy Figure}
\end{figure}
\lipsum[3]

\section{Introduction to PSTricks}
\lipsum[4]
\end{document}