I have a button that i make. but what i want is that to make the button center alligin. i use alignment center. but it is not working. what i have to do is that to make the button allignement in center in whole page.   .button {   text-decoration:none;   text-align:center;   display: flex;   background: #333333;   color: white;   justify-content: space-between;   align-items: center;   pointer-events:none;   max-width:660px;   border-bottom:solid gray 1px     font-family: DIN pro;     font-weight: bold; } .button .fa {   padding:1em;   pointer-events:auto;   width:1.5em; } .button::before {   content: '';   padding: 1em } &lt;a href="#" class="button"&gt; CONTACT &lt;i class="fa fa-arrow-right border-left "&gt;&lt;/i&gt;&lt;/a&gt;
42
How can I horizontally center a &lt;div&gt; within another &lt;div&gt; using CSS? &lt;div id=&quot;outer&quot;&gt;   &lt;div id=&quot;inner&quot;&gt;Foo foo&lt;/div&gt; &lt;/div&gt;
32653
When using the flalign, I either get LHS and the = on te far left and the RHS on the far right.    \begin{flalign} x &amp; = &amp; 1 \end{flalign}   Or I the equation centers itself when I try    \begin{flalign} x &amp; = 1 \end{flalign}   How can I get everything on the LHS?
23833
I am trying to center my chapters/sections/subsections.  I have used the following:  \newcommand{\cchapter}[1]{\chapter[#1]{\centering #1}} \newcommand{\ssection}[1]{\section[#1]{\centering #1}} \newcommand{\ssubsection}[1]{\subsection[#1]{\centering #1}}   This seems to work for chapter, but not for section and subsection. What is wrong?
75501
I'm using the \align* environment from the amsmath package.  How can I center one of the lines inside the environment?  In the following example, I want to the \vdots to be centered, instead of awkwardly aligned with the b above it.  \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} &amp; a = (a_1, a_2) \\ &amp; b = (b_1, b_2) \\ &amp; \vdots \\ &amp; z = (z_1, z_2) \end{align*} \end{document}
100506
I see bold and italics button but no inline code while it uses quite an uncommon syntax (back ticks, `` - the syntax is good, just not very obvious). It would be convenient to have this button.  Related but not the same:
60562
My understand is text should be left-aligned; dates, times, and numbers should be right-aligned; images should be centered.  What about Boolean strings "Yes"/"No"? My hunch says to center them.
97365
I'm trying to get some console output in my homework. I put it in a listings environment but I want it to be centered horizontally on the page.  The only thing I get centered is the caption ;-/  \begin{minipage}{1\textwidth} \begin{center} \begin{lstlisting}[caption={Ausgabe des C-Programms},label={ggt_c_ausgabe}] a  |  b  |  q  |  u  |  s  |  v  |  t   ---------------------------------------- 78 |  21 |   1 |     |   1 |   1 |  -1  21 |  15 |   3 |   1 |  -3 |  -1 |   4  15 |   6 |   1 |  -3 |   4 |   4 |  -5   6 |   3 |   2 |   4 | -11 |  -5 |  14   3 |     |   2 | -11 |  26 |  14 | -33  ---------------------------------------- \end{lstlisting} \end{center} \end{minipage}
71142
I'm trying to make a pistol with a hammer thingy on the back. I've been struggling to make the back perfectly aligned like the red line in the 3rd image. Any help would be appreciated.
14638
I'm new with LaTeX and I'm trying to make a table with the elements centered vertically and horizontally. I've searched for this question, it seems like most people were trying to do things a little more complicated than this, resulting in complicated answers I couldn't understand. The table below is already centered horizontally, but the elements are aligned to the top of the cells instead of the center. How do I fix this?      \begin{tabular}{*{5}{|c}|}         \hline         $p$ &amp; $q$ &amp; $p \land q$ &amp; $p \lor q$ &amp; $p \to q$\\         \hline         T &amp; T &amp; T &amp; T &amp; T\\         \hline         T &amp; F &amp; F &amp; T &amp; F\\         \hline         F &amp; T &amp; F &amp; T &amp; T\\         \hline         F &amp; F &amp; F &amp; F &amp; T\\         \hline     \end{tabular}
36311
I love how you can resize windows by pressing alt+middle-mouse-button and drag.  Though now I got a mouse which doesn't support pressing the middle mouse button..   How do I do to change the combination from alt+middle-mouse-button to alt+right-mouse-button?  (On Ubuntu 11.04 with unity)
53033
This may be a stupid question, but I have searched online for a little bit and can't seem to find my answer. I am working on a circuit board that uses buttons that i've never seen before. These buttons just have a metal lead around them and an LED in the middle (for lighting up the button I'd assume) but how does a button like this even work? I've attached some pictures to show you what i mean.    this is the back of the push buttons from the device
13688
I can make Firefox not display the ugly dotted focus outlines on links with this:  a:focus {      outline: none;  }   But how can I do this for &lt;button&gt; tags as well? When I do this:  button:focus {      outline: none;  }   the buttons still have the dotted focus outline when I click on them.  (and yes, I know this is a usability issue, but I would like to provide my own focus hints which are appropriate to the design instead of ugly grey dots)
23842
Suppose that I have a &lt;div&gt; that I wish to center in the browser's display (viewport). To do so, I need to calculate the width and height of the &lt;div&gt; element.   What should I use? Please include information on browser compatibility.
42134
I wanto to center a text in a colorbox which is scaled horicontal over the complete site.    How is this possible?  \documentclass[ ]{scrreprt}  \usepackage[ ]{scrpage2}  \usepackage[ngerman]{babel}                 %% Deutsches Sprachpaket \usepackage[utf8]{inputenc}                 %% Eingabezeichensatz UTF-8 \usepackage[T1]{fontenc}                    %% Kodierung für Umlaute \usepackage[ngerman]{translator}            %% Für Abkürzungsverzeichnis benötigt \usepackage{lmodern}                        %% Moderne Version von Computer Modern \usepackage{setspace}                       %% Zeileabstand anpassen \usepackage{xcolor}                         %% Definieren von Farben  \begin{document}  \chapter{} \definecolor{lightgray}{gray}{0.5} \newcommand \colbox [1]{\par\noindent\colorbox{gray}{\begin{minipage}{\textwidth}{ {#1}} \hfill \end{minipage}}}  \colbox{TEXT}  \end{document}   Moreover I want to avoid the overfull hbox.
2220
When looking at most sites (including SO), most of them use:  &lt;input type="button" /&gt;   instead of:  &lt;button&gt;&lt;/button&gt;    What are the main differences between the two, if any? Are there valid reasons to use one instead of the other? Are there valid reasons to use combine them? Does using &lt;button&gt; come with compatibility issues, seeing it is not very widely used?
61850
I'm trying to horizontally center a &lt;div&gt; block element on a page and have it set to a minimum width. What is the simplest way to do this? I want the &lt;div&gt; element to be inline with rest of my page. I'll try to draw an example:  page text page text page text page text page text page text page text page text                -------                | div |                ------- page text page text page text page text page text page text page text page text
6298
Best way to center a &lt;div&gt; element on a page both vertically and horizontally?  I know that margin-left: auto; margin-right: auto; will center on the horizontal, but what is the best way to do it vertically, too?