.info-bg-section {   background: transparent url(../images/img.jpg) repeat fixed 0 0/cover;   position: relative; }  .info-section-colored {   background-color: #3F3FB5;   padding: 100px 40px; } &lt;div class="info-bg-section dark-bg"&gt;   &lt;div class="container-fluid"&gt;     &lt;div class="row"&gt;       &lt;div class="col-md-4 info-section-colored"&gt;         &lt;p&gt;Content 1&lt;/p&gt;         &lt;p&gt;Content 1&lt;/p&gt;         &lt;p&gt;Content 1&lt;/p&gt;         &lt;p&gt;Content 1&lt;/p&gt;         &lt;p&gt;Content 1&lt;/p&gt;       &lt;/div&gt;       &lt;div class="col-md-8"&gt;         &lt;p&gt;Content 2 &lt;/p&gt;       &lt;/div&gt;     &lt;/div&gt;   &lt;/div&gt; &lt;/div&gt;     I want to add padding to this section (info-bg-section). Also I want to align  vertically content in divs.  I tried to add padding to divs but it seems it isn't good idea
555
I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers? &lt;div id=&quot;header&quot;&gt;   &lt;img src=&quot;..&quot; &gt;&lt;/img&gt;   &lt;h1&gt;testing...&lt;/h1&gt;   &lt;img src=&quot;...&quot;&gt;&lt;/img&gt; &lt;/div&gt;
76067
In a beamer presentation, I am using the following code to add logos on my title page:  \titlegraphic{   \includegraphics[width=3cm]{logo-lirmm.png}   \hspace*{0.75cm}~%   \includegraphics[width=3cm]{logo-york.png}   \hspace*{0.75cm}~%   \includegraphics[width=3cm]{logo-dc.png} }   This code aligns vertically the three logos at the bottom. How can I center them vertically?
30717
When I can scroll down far enough to have the hot network questions overlap the footer (because my question is short) there is no background under the text:    Could they either be given a white background: (just disable the transparency option)    Or stop at the footer:      This also happens with the help text on some sites, as per this bug report:     Ubuntu 14.04.1 (Latest LTS Version), . Same problem with  and .  Windows 10 Pro,  and .  (Images linked to screenshot of browser)  My question is different from  because my issue is the lack of background on the footer.   I think there was a site redesign?
85398
I've been testing the customization capabilities of communities with napili template. One of the very basic things I cannot easily do is, branding. I can update the logo, but not the background. It seems I need to override the CSS, found the below snippet that helps to change the background,  .default-bg-overlay {     background: white none repeat scroll 0 0 !important; }  The above one change the header color, but not the body, I also cannot set the background image. What would be the right way to do it?
77342
Is it possible to to change a &lt;span&gt; tag (or &lt;div&gt;) to preformat its contents like a &lt;pre&gt; tag would using only CSS?
102978
I'm doing a beamer presentation and for this I'm using a background image on each slide. To have a readable text I put it on a untitled block with background transparency (cf image).    My problem is the overlap between the block's header and the block's body : as you can see, together, the element's transparency is lower because this overlap.  I think I've two solution :   reduce the height of the block's header extend the space between header and body's block   But I don't know how to do this. Can someone explain me how to do this properly ? Or may be existing an other (and simpler) solution…  Thank you  Here is my code :  \documentclass{beamer}  \usepackage{beamerbasethemes} \usepackage{calc} \usepackage{ifthen} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[no-math]{fontspec} \usepackage{ragged2e} \usepackage{graphics} \usepackage[frenchb]{babel} \usepackage{nicefrac} \usepackage{xcolor} \usepackage{calc} \usepackage{tikz}  % link to the backgroundimage % image should be in the same directory as the other files \def\blackboard@backgroundimagefile{bg.jpg} \DeclareOptionBeamer{backgroundimagefile}{\def\blackboard@backgroundimagefile{#1}} \ProcessOptionsBeamer  \mode&lt;presentation&gt;  \pgfdeclareimage[interpolate=true, height=\the\paperheight, width=\the\paperwidth]{backgroundImage}{\blackboard@backgroundimagefile}  % stretch background image over the entire page \setbeamertemplate{background}{     \begin{tikzpicture}         \useasboundingbox (0,0) rectangle (\the\paperwidth, \the\paperheight);          \pgftext[at=\pgfpoint{0cm}{0cm}, left, base]{\pgfuseimage{backgroundImage}};      \end{tikzpicture} }  \setbeamertemplate{blocks}[rounded][shadow=false] \addtobeamertemplate{block begin}{\pgfsetfillopacity{0.75}}{\pgfsetfillopacity{1}}  \begin{document}      \begin{frame}{Projet}{Axe 1 : Petite enfance et découverte}         \begin{block}{}             \begin{itemize}                 \item A deux ans, 90\% de psychomotricité globale et 10\% de jeux et d'activités sur surface élastique                 \item A 3 ans, 80\% de psychomotricité globale et 20\% de jeux et d'activités sur surface élastique                 \item A 4 ans, 65\%  de psychomotricité globale et 35\% d'activités sur surface rebondissante                 \item A 5 ans, 50\% de psychomotricité globale et 50\% d'éducation aérienne.             \end{itemize}             \vfill             En introduisant ainsi les surfaces élastiques, cela nous permettrait également une détection précoce des talents et aptitudes des enfants, pouvant alors à les orienter vers des disciplines plus appropriées une fois l’âge venu.         \end{block}     \end{frame} \end{document}
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;
66993
When we use a header in a Question or Answer, the header is starting a new section of text, and is not related to the previous text above it (we have bold etc for highlighting within current text).    However, currently the space above the header is less than the space below it, so the header visually appears to be more closely linked and relevant to the text above the header.    For example:      Here I write some text about conservation within urban areas.    Header to portray I'm starting a new context (or other usage)  Do mice understand algebra when given enhancement drugs?    The header is closer to the text above than it is the text it's relevant to below. I measured it's roughly 5 pixels more space from the bottom of the header to the next text, than it is from the top of the header to the text above.  Can we have the spacing slightly adjusted so (whatever space is decided) there is more above the header than below?    Something like:  margin-top: 1.5em; would do it (i.e. on h2{})    This is what the exact above example looks like with 1.5 em added to the top (using Firebug):     It's not much, but it's enough to separate the text correctly.
4073
how could i vertically center a &lt;div&gt; within a &lt;div&gt; ?  my code so far:  &lt;div style="height:322px;overflow:auto;"&gt;     &lt;div style="border: Solid 1px #999999;padding:5px;"&gt;     &lt;/div&gt; &lt;/div&gt;   i have tried "top:50%;" and "vertical-align:middle;" without success  EDIT: okay so it's been discussed a lot. and i've maybe started another mini flame war. but for argument sake, how would i do it with a table then? i've used css for everything else so far so it's not like i'm not trying to employ "good practices".  EDIT: the inner div does not have a fixed height
48709
Every time I try to do something seemingly-simple in CSS, it doesn't work.  I have a content div that contains a 460x160 image. All I want to do is position the image at the bottom-right corner and wrap my text around it.  &lt;div id="contents"&gt;     &lt;img src="..." /&gt;     text text text text text text ... &lt;/div&gt;   So I want it to look like:  ------------------ | text text text | | text text text | | text text -----| | text text |    | ------------------   Doing it with a top-left or top-right image is cake:  #contents img { float:right; }  ------------------ | text text |    | | text text -----| | text text text | | text text text | ------------------   Now how do I push that to the bottom? The best I've come up with so far are:  #contents img { float:right; margin-top: 90%} // really needs to be 100%-160px  ------------------ | text text      | | text text      | | text text -----| | text text |    | ------------------   In this case the text does not print in the margin, so there is white space above the image.  #contents { position:relative; } #contents img { position:absolute; right:0; bottom:0; }  -or-  // move the img tag under the text in the html and: #contents img { float:right; margin-top:-160; }  ------------------ | text text text | | text text text | | text text -----| | text text | te | ------------------   In this case the text prints over or under the image.  So... how can I accomplish this?
18676
I just edited an answer on Unix&amp;Linux and when scrolling down, the semi-transparent right sidebar boxes "How to edit" and "How to format" kept their fixed positioning and overlapped with the page footer.     While posting this, I have seen several (not) duplicate questions about this issue, and although from my personal taste, I would prefer the boxes to stop scrolling before the footer is reached, I can accept the development teams decision to let it overlap.   However, on all those other posts, the boxes had an opaque background, so that the footer was hidden and the box content was readable. Here the boxes are transparent though, so the texts get mixed and are no longer well readable.
97536
My vf page     &lt;apex:page renderAs="pdf" Controller="testpdf1"&gt;     &lt;head&gt;         &lt;style type="text/css" media="print"&gt;             @page              {                 size: 8.5in 11in;/* width height */             }              @page              {                 @top-center                  {                     content: element(header);                 }                  @bottom-left                  {                     content: element(footer);                 }             }              div.header              {                 padding: 10px;                 position: running(header);             }              div.footer              {                 display: block;                 padding: 5px;                 position: running(footer);             }              .pagenumber:before              {                 content: counter(page);             }              .pagecount:before              {                 content: counter(pages);             }         &lt;/style&gt;     &lt;/head&gt;      &lt;div class="header"&gt;             &lt;div align="right"&gt;Header&lt;/div&gt;     &lt;/div&gt;      &lt;div class="footer"&gt;         &lt;div&gt;Page &lt;span class="pagenumber"/&gt; of &lt;span class="pagecount"/&gt;&lt;/div&gt;     &lt;/div&gt;      &lt;div class="content"&gt;         &lt;p&gt;             &lt;apex:repeat value="{!opp}" var="item"&gt;                 &lt;tr&gt;                     &lt;td class="tableContent"&gt;{!item.Name}&lt;/td&gt;                 &lt;/tr&gt;             &lt;/apex:repeat&gt;         &lt;/p&gt;     &lt;/div&gt; &lt;/apex:page&gt;   Controller  public class testpdf1 {     public list&lt;Account&gt; opp{get;set;}      public testpdf1()     {         opp=[SELECT Name  from Account limit 50];     } }   I am getting all records in pdf format but able to get header in first page only and i am not getting header from second pages how can i display header to all pages.
61134
Code: \documentclass{article} \usepackage[a5paper]{geometry} \usepackage{multicol} \setlength{\parindent}{0cm} \begin{document} \begin{multicols}{2}   \begin{enumerate}   \item text 1   \item text 2   \item text 3   \item text 4   \item text 5   \end{enumerate} \end{multicols} \end{document}  Gives this:  How to move &quot;text 5&quot; upwards adjacent to &quot;text 4&quot;?
97297
Does anyone know how to shade the background and put a border around a multicol environment, where page breaks are needed.  There is a couple of posts around, most notably, , but there seems to be problems.  The best looking environment is the tcolorbox, but, cant do pagebreaks.  mdframed appears to overflow when pagebreaks are required (ie when multicol env. across multiple pages)  I really don't have an MWE, given the above comments RE tcolorbox and mdframed.
51550
The following code does not align the contents of the two columns do not align properly; in particular, the content of the left column is a bit lower on the page than the content of the right column.   \documentclass [11pt]{article} \usepackage{amsmath} \usepackage{multicol}  \begin{document} \noindent So why do the two colums not align vertically? \begin{multicols}{2} \begin{align*} &amp; \text{\underline{function} } f_a(x): \\ &amp; \quad \text{\underline{begin}} \\ &amp; \quad \quad i \leftarrow 1; \\ &amp; \quad \quad \text{\underline{while}} (g(i) \neq x) \text{ \underline{do} }         i \leftarrow i +1; \\ &amp; \quad \quad f_a \leftarrow 0; \\ &amp; \quad \text{\underline{end}} \end{align*} \begin{align*} &amp; \text{\underline{function} } f_a(x): \\ &amp; \quad \text{\underline{begin}} \\ &amp; \quad \quad i \leftarrow 1; \\ &amp; \quad \quad \text{\underline{while}} (g(i) \neq x) \text{ \underline{do} }     i \leftarrow i +1; \\ &amp; \quad \quad f_a \leftarrow 0; \\ &amp; \quad \text{\underline{end}} \end{align*} \end{multicols} \end{document}   Why? And how can I fix this?  Note: I tried using \Columnbreak, to no avail. Curiously, if I add a blank line between the two align* environments, the content of the right column is a bit lower than the one on the left...
50386
I have a code, that outputs a standard pager:  print theme('pager');   it outputs this:  &lt;h2 class="element-invisible"&gt;Pages&lt;/h2&gt; &lt;div class="item-list"&gt; &lt;ul class="pager"&gt;&lt;li class="pager-current first"&gt;1&lt;/li&gt; &lt;li class="pager-item"&gt;&lt;a title="Go to page 2" href="/drupal/node?page=1"&gt;2&lt;/a&gt;&lt;/li&gt; &lt;li class="pager-item"&gt;&lt;a title="Go to page 3" href="/drupal/node?page=2"&gt;3&lt;/a&gt;&lt;/li&gt; &lt;li class="pager-next"&gt;&lt;a title="Go to next page" href="/drupal/node?page=1"&gt;next ›&lt;/a&gt;&lt;/li&gt; &lt;li class="pager-last last"&gt;&lt;a title="Go to last page" href="/drupal/node?page=5"&gt;last »&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;   How can I change the HTML to something like this:  &lt;ul class="pagination"&gt;     &lt;li&gt;&lt;a href="#"&gt;&amp;lt;&lt;/a&gt;&lt;/li&gt;     &lt;li&gt;&lt;a href="#"&gt;1&lt;/a&gt;&lt;/li&gt;     &lt;li&gt;&lt;a href="#" class="active"&gt;2&lt;/a&gt;&lt;/li&gt;     &lt;li&gt;&lt;a href="#"&gt;3&lt;/a&gt;&lt;/li&gt;     &lt;li&gt;&lt;a href="#"&gt;&amp;gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;   I looked into this thread: , created a function bartik_preprocess_custom_pager and a file custom-pager.tpl.php inside my Bartic theme templates, but I can't make it work.  print theme('custom_pager');   outputs nothing. Does anybody know, how can I customize the HTML output for a pager, creating one just for 1 page?
51169
\documentclass{mwrep}  \usepackage[draft]{graphicx} \usepackage{hyperref} \usepackage[all]{hypcap}  \makeatletter \g@addto@macro\@floatboxreset\centering \makeatother I use figures with captions.  \begin{document}  \listoffigures  \chapter{foo}  First paragraph (previous).  \begin{figure}[h]   \includegraphics{a.jpg}   \caption{Opis} \end{figure}  Second paragraph (following).  \end{document}   How can I change vertical space (padding?) between caption and following paragraph? Also, I want to change (increase a little) space between previous paragraph and top of image.