I'm not good in html, css, i want to apply boarder to dev, which contains image in right     .amount-2 {     border: 3px solid #4CAF50;     padding: 5px;     width: 70%;     float:left; }  .sample {     float: right;     width: 30%;     margin-top: -100px; } &lt;div class="amount-2"&gt; Files must be less than 2 MB. Allowed file types: png gif jpg jpeg. Images must be between 200x200 and 800x1400 pixels. Web page addresses and e-mail addresses turn into links automatically. Lines and paragraphs break automatically.  &lt;img class="sample" src="https://gallery.yopriceville.com/var/albums/Free-Clipart-Pictures/Cartoons-PNG/Cute_Bunny_Cartoon_Transparent_Clip_Art_Image.png?m=1478318101" alt="Pineapple" width="150" height="200"&gt;  &lt;/div&gt;     I dont want to fix the heights
120595
I'm having this problem, same as ever, but never try to find the right solution  code:   &lt;div id="ListOfTextAndPhotos"&gt;       &lt;div style="border-bottom: solid 1px silver;"&gt;           &lt;img src="photo.jpg" style="float: left"&gt;           Some text about the photo       &lt;/div&gt;       &lt;div style="border-bottom: solid 1px silver;"&gt;           &lt;img src="photo2.jpg" style="float: left"&gt;           Some text about the photo2       &lt;/div&gt;       &lt;div style="border-bottom: solid 1px silver;"&gt;           &lt;img src="photo3.jpg" style="float: left"&gt;           Some text about the photo3       &lt;/div&gt;   &lt;/div&gt;   Question: How do I to keep the photo inside the DIV? with the separator line under the photo
122041
I want to create a problem booklet consisting of some questions and images on the marginpar. How to make sure the images properly float on the marginpar?  If you carefully see the left image below, you will notice that the most bottom image gets cropped as it is not properly floated.     \documentclass[twoside,12pt]{book} \usepackage[     a4paper,     vmargin=2cm,     outermargin=9cm,     innermargin=2cm,     marginparwidth=7cm,     marginparsep=20pt ]{geometry}  \usepackage{graphicx} \usepackage{marginnote} \usepackage{caption} \usepackage{lipsum}  \newcommand\MarginFig[1]{% \marginpar{\includegraphics[width=\marginparwidth]{example-image-a} \captionof{figure}{#1} \label{#1}}}    \begin{document} \chapter{Higgs Boson} \lipsum[1-3]  \begin{enumerate} \item \MarginFig{1} \MarginFig{2} \MarginFig{3} \lipsum[1-2]  \item \MarginFig{4} \MarginFig{5} \MarginFig{6} \lipsum[1-2]  \item  \MarginFig{7} \MarginFig{8} \MarginFig{9} \lipsum[1-2]  \end{enumerate} \end{document}   This question is a continuation of .  Edit 3  Bonus questions (without prizes): Among the permutation of  \MarginFig{n}, \MarginFig{n+1}, \MarginFig{n+2}, and \lipsum[1-2], which one will produce the best floating?
85377
I'm trying to include an image, and keep it centered, and prevent from wrapping from the next page.  The following code works for that:  \begin{minipage}{\textwidth}     \begin{center}         Caption for image          \includegraphics[scale=0.5]{myimage.png}      \end{center} \end{minipage}   I'd like this image to be in a figure, with a caption.  The following doesn't compile:  \begin{minipage}{\textwidth}     \begin{figure}         \includegraphics[scale=0.5]{myimage.png}         \caption{Caption for image}         \label{fig:sample_figure}     \end{figure} \end{minipage}   I get the errors:  ! LaTeX Error: Not in outer par mode. ! Undefined control sequence.   How can I fix this?
14384
still working on that table. Here's my new question reguarding the table borders:  It appears, that i do something wrong setting boarders. Here is my code, and a screenshot:  \documentclass{article} \usepackage{multirow} % Used for the vertical cells \usepackage{rotating} % Used for the vertical cells  \usepackage{xcolor} % Used for cell-colors \usepackage{colortbl} % Used for cell-colors  \usepackage[a4paper]{geometry}% Used to set the pdf margins manually \newgeometry{left=2cm,bottom=0.1cm}  \definecolor{grey}{HTML}{F2F2F2} % Define grey for the cells \definecolor{red}{HTML}{FF0000} % Define red for testing  \begin{document} \scriptsize % Use a small font size  \begin{tabular}{|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0.6cm}|p{0,6cm}|}  \cline{10-17}  \multicolumn{9}{|c|}{} &amp; \multicolumn{2}{p{\dimexpr (0.6cm)*2+2\arrayrulewidth+2\tabcolsep\relax}|}{\cellcolor{grey}Work to retired ratio} &amp; \multicolumn{4}{p{\dimexpr (0.6cm)*4+1\arrayrulewidth+2\tabcolsep\relax}|}{Health care sizing (per thousand)} &amp; \multicolumn{2}{p{\dimexpr (0.6cm)*2+1\arrayrulewidth+2\tabcolsep\relax}|}{\cellcolor{grey}Inverse dependency ratio}\\\cline{3-9}  \multicolumn{2}{|c|}{} &amp; \multicolumn{4}{c|}{\cellcolor{grey}Population (mio.)} &amp; \multicolumn{3}{c}{Workforce (1000)}  &amp; \multicolumn{2}{|c|}{\cellcolor{grey}} &amp; \multicolumn{2}{l|}{Physicians by} &amp; \multicolumn{2}{l}{Nurses by} &amp; \multicolumn{2}{|l|}{\cellcolor{grey}Old agers by}\\\hline  \multicolumn{2}{|c|}{} &amp; \begin{sideways}\cellcolor{grey}\parbox{4cm}{Overall}\end{sideways} &amp; \begin{sideways}\cellcolor{grey}\parbox{4cm}{Young age}\end{sideways} &amp; \begin{sideways}\cellcolor{grey}\parbox{4cm}{Working age}\end{sideways} &amp; \begin{sideways}\cellcolor{grey}\parbox{4cm}{Old age}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Overall}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Physicians (Proj: 2025)}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Nurses (Proj: 2030)}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{\cellcolor{grey}Working age by Old age}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{\cellcolor{grey}Work force by Old age}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Workforce}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Working age}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Workforce}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{Working age}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{\cellcolor{grey}1 physicians}\end{sideways} &amp; \begin{sideways}\parbox{4cm}{\cellcolor{grey}1 nurse}\end{sideways}\\\hline  \multicolumn{2}{|l}{USA} &amp; \multicolumn{4}{l}{\cellcolor{grey}} &amp; \multicolumn{3}{l}{} &amp; \multicolumn{2}{l}{\cellcolor{grey}} &amp; \multicolumn{4}{l}{} &amp; \multicolumn{2}{l|}{\cellcolor{grey}}\\\hline  1990/1 &amp; &amp; 248,6 &amp; 71,3 &amp; 146,1 &amp; 31,2 &amp; 127.500 &amp; 615,4 &amp; 1491,6 &amp; 4,68 &amp; 4,09 &amp; 4,83 &amp; 4,21 &amp; 11,70 &amp; 10,21 &amp; 50,7 &amp; 20,9\\\hline  1 &amp; 2 &amp; 3 \\\hline  \end{tabular}  \end{document}     On 1 the Top border of Population is not visible although i did used \\\cline{3-9}\cline{12-17} on that line.  In 2 both borders are pushed a bit to the right for no reason i can see.  And in 3 again the top borders are not visible despite using \cline{10-17} on that line. What did i do wrong?  Thanks!
46059
I'm a big fan of Yahoo's  for speeding up websites. One of the recommendations is to combine images where possible to cut down on size and the number of requests. However, I've noticed that while it can be easy to use CSS sprites for layouts, other image uses aren't as easily combined. The primary example I'm thinking of is a blog or article list, where each blog or article also has an image associated with it. Those images can greatly affect load time and page size, especially if they aren't optimized. What I'm looking for, in concept or in practice, is a way to dynamically combine those images while running them through a loss-less compression using PHP.   A few added thoughts or concerns:   Combining the images and generating a dynamic CSS stylesheet to position the backgrounds of the images might be one way to go about it, but I also worry about accessibility and semantics. As far as I understand, CSS images should be used for layout elements and the img tag (with the alt attribute) should be used for images that are meant to convey information. I could set the image as a background to a div element and substitute a title attribute for the alt attribute, but I'm unsure about the accessibility and semantic implications of doing so. Might the GD library be a good candidate for something like this? Can you recommend other options?
107098
I have an image with a woman, and I need to make an ad (size 260mmx125mm). I want to put the woman to the left side, but then right side becomes empty. So, how I should solve the problem? I have picked the color from image, but it is definitely different than in the actual picture.  Should I use the Clone Stamp Tool in Photoshop, or there is a better way to do this?  By the way, it will be used in print, so I need a good quality.
8738
I have a layout that is working, but it has one very annoying problem.. when the content is taller than the screen, the background stops.  This is the desired layout in bad-ASCII-art format:  _____________________  _ |    | long    |logo|   | |    | content |    |   | |    |         |    |   | |    |         |    |   | |grad|         |grad|   | Viewport |    |         |    |   | |    |         |    |   | |    |         |    |  _| |    |         |    | |    |         |    | _____________________  |2em| &lt;-20em-&gt;| 2em|   ..or with short content..  _____________________  _ |    | short   |logo|   | |    | content |    |   | |    |         |    |   | |    |         |    |   | |grad|         |grad|   | Viewport |    |         |    |   | |    |         |    |   | |    |         |    |   | |    |         |    |   | _____________________  _|   Basically it looks like a single column, with a glow as a column either side. Over the left-glow is a logo. When the content is short, it is still the full-height.  I have tried using the , which fixes the middle column, but then the gradients only extend as far as the content (in the left column, a single &amp;nbsp;, in the right column the logo)    Here is what the layout looks like:    And the problem (when the browser window is shrunk vertically):    Finally, the problem HTML/CSS,
101276
I need a way to restrict authors from uploading images bellow specific dimensions.   Say I only want to allow uploading images that are at least 400px x 400px. If the image size is smaller, the author should get an error notice that the image is too small.    Is there a plugin or code that can accomplish this?
10149
I'm a beginner at rails programming, attempting to show many images on a page.  Some images are to lay on top of others.  To make it simple, say I want a blue square, with a red square in the upper right corner of the blue square (but not tight in the corner).  I am trying to avoid compositing (with ImageMagick and similar) due to performance issues.  I just want to position overlapping images relative to one another.  As a more difficult example, imagine an odometer placed inside a larger image.  For six digits, I would need to composite a million different images, or do it all on the fly, where all that is needed is to place the six images on top of the other one.
120546
&lt;html&gt;     &lt;head&gt;         &lt;style type="text/css"&gt;             div {                 border:1px solid #000;                 min-width: 50%;             }         &lt;/style&gt;     &lt;/head&gt;     &lt;body&gt;         &lt;div&gt;This is some text. &lt;/div&gt;     &lt;/body&gt; &lt;/html&gt;   I believe the div should be 50 percent of the page, unless, for some reason, the text inside the div makes it larger. However, the border around the div stretches across the entire page width. This occurs in both IE and Firefox.  Suggestions?
56460
Currently i am unable to create images that get resized automaticaly according to the different image styles.  This includes the default styles such as thumbnail as well as the custom created styles.  I have checked the "Public file system path" as well as the "Temporary directory" (under Configuration > File system).  Both of the directories exist.  The file permissions are good on the directories (777).  The original file that's uploaded gets created. It's just the scaled images that aren't getting created.  Any help with this problem would be very welcome. If there is already a solution somewhere (which means i searched for the wrong terms), a link to that would be very appreciated.  edit:   I can't find anything in the logfile either, except for messages like :  type : page not found  message: sites/default/files/styles/thumbnail/public/fotoslider/slider_images/testbeeld20130103005.jpg
10994
MWE  Please use the image linked to below.  \documentclass{article} \usepackage{graphicx}  \begin{document} \includegraphics{dank} \end{document}   Oddly enough, only this picture fails and only when compiling with XeTeX (as opposed to pdfTeX or LuaTeX):  ERROR: Dimension too large.  --- TeX said --- &lt;to be read again&gt;                     b l.5 \includegraphics{dank}  --- HELP --- From the .log file...  I can't work with sizes bigger than about 19 feet. Continue and I'll use the largest value I can.    is a bit of an eyesore, so I'm not displaying it inline.  Please check the shasum to make sure it's still the same file when you download it.  $ shasum dank.jpg b889bc28b2ccd079073267159db0562f45b58e4d  dank.jpg   What's special about this image?  Why does it fail?  Its natural setting (as seen with LuaTeX or pdfTeX) is well under 19 feet.
45466
Possible Duplicate:          I want to get a solution for a question that has been in my mind for a long time.  For the past 2 years, several times I was assigned to do some job involving low resolution images. Such as icon making, favicon making etc. These files have very low resolution like 16*16 px, 32*32px or maybe upto 100px.   I used Photoshop and Illustrator for creating such graphics. It looks fine and perfect in high resolution, but when I try to decrease the size to required low resoution, the images have noticeable defects in clarity. I was surprised to see low resolution images in other websites with better clarity and wondering, How is that possible? Hope stack will solve my problem.
26006
I want to show an image from an URL with a certain width and height even if it has a different size ratio.  So I want to resize (maintaining the ratio) and then cut the image to the size I want.  I can resize with html img property and I can cut with background-image.  How can I do both?  Example:  This image:     Has the size 800x600 pixels and I want to show like an image of 200x100 pixels   With img I can resize the image 200x150px:  &lt;img      style="width: 200px; height: 150px;"      src="http://i.stack.imgur.com/wPh0S.jpg"&gt;    That gives me this:    &lt;img style="width: 200px; height: 150px;" src="https://i.stack.imgur.com/wPh0S.jpg"&gt;       And with background-image I can cut the image 200x100 pixels.  &lt;div      style="background-image:            url('https://i.stack.imgur.com/wPh0S.jpg');      width:200px;      height:100px;      background-position:center;"&gt;&amp;nbsp;&lt;/div&gt;    Gives me:        &lt;div style="background-image:url('https://i.stack.imgur.com/wPh0S.jpg'); width:200px; height:100px; background-position:center;"&gt;&amp;nbsp;&lt;/div&gt;      How can I do both?  Resize the image and then cut it the size I want?
112734
Tables, graphs and images don't show up at the same position it was inserted in the TeX file. I tried to suppress floating by using:  \usepackage{float} ... \begin{figure}[H] {15cm} \caption{}% \label{} \fbox{\includegraphics[width=\hsize]{image.jpeg}} \end{figure}   also  \begin{figure}[!htbp] {15 cm} ...  \usepackage{placeins} \FloatBarrier \begin{figure}[H] {15cm} ...   but these commands keep insisting on moving figures, tables and graphs to unexpected locations. I'm using repUERJ template available   Does anyone know why it happens?
111836
I really love the way  works, but unfortunately it doesn't look very sharp on a , especially when juxtaposed with browser-rendered text. If you made the generated image twice its current size, it would circumvent this problem.  Could you please generate larger source images? Keeping the same width and height HTML attributes will mean that the image won't look any different for current users, so there's no chance of anything breaking.  It's a small difference, but quality is in the details!
87785
I have a web server where I have run out of space and it's causing issues with the  sites I am running on them.  I know that I have a lot of large .png files (the fact that it's  is a mistake in itself, but let's not get into that).  I would like to get the list of PNG or  files that are on the server and sort them by decreasing size. I know I can use ls -SlahR, but the sorting is on a per-folder basis.  I then came up with find . -name "*.png" | xargs -i -n1 ls -lah {} which is OK except that (a) it doesn't sort the lines and (b) it shows the file permissions and ownerships which I couldn't care less about.  So is there something better? Something that would produce [size] [path_to_file]?