I have a horizontal navbar like the following:  &lt;ul id = "Navigation"&gt;     &lt;li&gt;&lt;a href = "About.html"&gt;About&lt;/a&gt;&lt;/li&gt;     &lt;li&gt;&lt;a href = "Contact.html"&gt;Contact&lt;/a&gt;&lt;/li&gt;     &lt;!-- ... --&gt; &lt;/ul&gt;   I use CSS to remove the bullet points and make it horizontal.  #Navigation li {     list-style-type: none;     display: inline; }   I'm trying to justify the text so each link is spread out evenly to fill up the entirety of the ul's space.  I tried adding text: justify to both the li and ul selectors, but they're still left-aligned.  #Navigation {     text-align: justify; }  #Navigation li {     list-style-type: none;     display: inline;     text-align: justify; }   This is strange, because if I use text-align: right, it behaves as expected.  How do I spread out the links evenly?
34851
You find plenty of tutorials on menu bars in HTML, but for this specific (though IMHO generic) case, I haven't found any decent solution:  #  THE MENU ITEMS    SHOULD BE    JUSTIFIED     JUST AS    PLAIN TEXT     WOULD BE  # #  ^                                                                             ^  #    There's an varying number of text-only menu items and the page layout is fluid. The first menu item should be left-aligned, the last menu item should be right-aligned. The remaining items should be spread optimally on the menu bar. The number is varying,so there's no chance to pre-calculate the optimal widths.   Note that a TABLE won't work here as well:   If you center all TDs, the first and the last item aren’t aligned correctly. If you left-align and right-align the first resp. the last items, the spacing will be sub-optimal.   Isn’t it strange that there is no obvious way to implement this in a clean way by using HTML and CSS?
63322
I a chat discussion it was suggested that \hspace*{\fill} (with a space before it to allow for a line break) was sufficient to always get the text following aligned to the right. And indeed, it is aligned to the right.    However, in one case it is inserting an additional line  break where one should not be required as illustrated by the last example here.  I want the text bumped to the next line if and only if (iff ) there is no room:    If I remove the space before the \hspace*{\fill}, there are cases (second and third) where a new line should have been inserted but is not:    Related Question:      I have tried the suggestions at the related question and:   Martin Scharrer's suggestion of using \hbox{}\hfill results in the text being on the left for the last case. Herbert's \When macro exhibits a similar problem for the last case. Thorsten Donig's \signed macro does yield the correct number of lines, but portions of the file name for the middle two cases show up on the second line when they easily fit in the first line.     Notes:  I believe that this is unrelated to the problem, as I was able to reproduce the problem without it.  But, am mentioning it here in case it causes an issue with the proposed solution.  I am using \texttt for the file name. This resulted in an additional complication which I initially thought was the cause of the problem.  So, my actual use case is commented out below and it incorporates a solution from        Code:  \documentclass{article} \usepackage[paperwidth=7.0cm,showframe]{geometry} \usepackage{xcolor} \usepackage{xparse}   \newcommand*{\FillLine}[2]{% \noindent\parbox{\linewidth}{%     \raggedright     File:~#2 % &lt;-- Need space here     %Space before \hspace* allows for a break before it     \hspace*{\fill}\texttt{\small CONFIDENTIAL}%  }% }  %\newcommand*{\EnableHyphenationInTexttt}{\hyphenchar\font=45\relax} % %\newcommand*{\FillLine}[2]{% %    \noindent\parbox{\linewidth}{% %       \raggedright %       File:~\texttt{\EnableHyphenationInTexttt#2} % &lt;-- Need space here %       %Space before \hspace* allows for a break before it %       \hspace*{\fill}\texttt{\small CONFIDENTIAL}%  %    }% %}  \begin{document} \FillLine{Name}{Value}  \bigskip \FillLine{Name}{A-Long-Value}  \bigskip \FillLine{Name}{iiiiiii-iiiii-iiiiiii}  \bigskip \FillLine{Name}{Some-Really-Really-Long-Value} \end{document}
36830
I'm trying to make an itemized list in beamer (using the  package). By default, the text of first-level bullet points is left-aligned at the same point as non-list text, and the bullet actually comes before that. I want the bullet point to be aligned with or even further right from the non-itemized text, so I added a line to indent it (\setlength etc.):  \begin{block}{Evaluation}     Compare seasonality estimated by our method with that in:     \begin{itemize}         \setlength{\itemindent}{1.5em}         \item ``Agricultural" grid cells ($p_a &gt; 0.8$)          \item ``Non-agricultural" grid cells ($p_a &lt; 0.2$)         \item 80\% threshold based on the land cover classification scheme for cropland discussed by \citep{Hansen:2000wm}.     \end{itemize} \end{block}   Here is a picture of the result:   Unfortunately, this solves one problem and creates another. The third item has to have a line break, and the text on the second line is not left-aligned with the rest of the itemized list text. How do I make it align?
753
Sometimes, I'm getting as an input tab separated list, which is not quite aligned, for instance  var1  var2  var3 var_with_long_name_which_ruins_alignment  var2 var3   Is there an easy way to render them aligned?  var1                                      var2  var3 var_with_long_name_which_ruins_alignment  var2  var3
31813
Although elements like &lt;div&gt;s normally grow to fit their contents, using the float property can cause a startling problem for CSS newbies: If floated elements have non-floated parent elements, the parent will collapse. For example:   &lt;div&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt; &lt;/div&gt;    The parent div in this example will not expand to contain its floated children - it will appear to have height: 0. How do you solve this problem? I would like to create an exhaustive list of solutions here. If you're aware of cross-browser compatibility issues, please point them out. Solution 1 Float the parent.   &lt;div style="float: left;"&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt; &lt;/div&gt;    Pros: Semantic code. Cons: You may not always want the parent floated. Even if you do, do you float the parents' parent, and so on? Must you float every ancestor element? Solution 2 Give the parent an explicit height.   &lt;div style="height: 300px;"&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt; &lt;/div&gt;    Pros: Semantic code. Cons: Not flexible - if the content changes or the browser is resized, the layout will break. Solution 3 Append a &quot;spacer&quot; element inside the parent element, like this:   &lt;div&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt;   &lt;div class="spacer" style="clear: both;"&gt;&lt;/div&gt; &lt;/div&gt;    Pros: Straightforward to code. Cons: Not semantic; the spacer div exists only as a layout hack. Solution 4 Set parent to overflow: auto.   &lt;div style="overflow: auto;"&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt; &lt;/div&gt;    Pros: Doesn't require extra div. Cons: Seems like a hack - that's not the overflow property's stated purpose. Comments? Other suggestions?
78073
I need to put some text at the same height in my page, and I'm trying to do it with a minipage, but I'm not able to do it since they get centre-aligned.    This is the LaTeX for the figure I've uploaded:  \begin{minipage}[]{0.5\textwidth}     \begin{flushleft}         {\large \textit{Author}:\vspace*{0.5cm} \\          Me}     \end{flushleft} \end{minipage}% % \begin{minipage}[]{0.5\textwidth}     \begin{flushright}         {\large \textit{Supervisor}:\vspace*{0.5cm} \\          Him}\\         \vspace*{0.5cm}         {\large \textit{Advisor}:\vspace*{0.5cm} \\          Other Guy}     \end{flushright}     \end{minipage}%   Can you please explain me what I'm doing wrong?
31839
Given this HTML:  &lt;div&gt;foo&lt;/div&gt;&lt;div&gt;bar&lt;/div&gt;&lt;div&gt;baz&lt;/div&gt;   How do you make them display inline like this:     foo bar baz   not like this:     foo   bar   baz
33443
Sometimes I have two (or more) figure environments which I want to layout on one page, and put a horizontal rule in the center. To acomplish this, I put a \vfill\hrule\vfill between the two environments. However, this only works if I create a minipage spanning the whole text-region of a page.  However, if I do this I get either a hbox or a vbox overflow, depending on the document class. For article it's a hbox overflow of 15pt, for phdthesis (a cls I grabbed of the web) it's a vbox overflow also of 15pt.  This is a minimal working example:  \documentclass{article} \newlength{\minipagewidth} \newlength{\minipageheight}  \begin{document}% %results in:  Badbox, line 9: Overfull \hbox (15.0pt too wide) in paragraph at lines 9-26 \setlength{\minipagewidth}{\textwidth}% \setlength{\minipageheight}{\textheight}% \begin{minipage}[t][\minipageheight]{\minipagewidth}% Top of the page  \vfill\hrule\vfill  Bottom of the page \end{minipage} % no vbox or hbox overflow: \addtolength{\minipagewidth}{-15pt}% %\addtolength{\minipageheight}{-15pt}% \begin{minipage}[t][\minipageheight]{\minipagewidth}% Top of the page  \vfill\hrule\vfill  Bottom of the page \end{minipage}% \end{document}   The second minipage results in no such warning, but I had to subtract 15pt from the width. Where does this 15pt come from? why is \textwidth wider than the textual area's width?
51498
&lt;table&gt;          &lt;apex:repeat value="{!dataList}" var="List" id="dataTable"&gt;             &lt;tr&gt;                  &lt;th&gt;   Name &lt;/th&gt;                &lt;th&gt;   Status&lt;/th&gt;             &lt;/tr&gt;              &lt;tr&gt;                  &lt;td&gt;   &lt;apex:inputField value="{!List.Name}"/&gt; &lt;/td&gt;                &lt;td&gt;    &lt;apex:inputField value="{!List.Status__c}"/&gt;&lt;/td&gt;             &lt;/tr&gt;           &lt;/apex:repeat&gt;   &lt;/table&gt;     I want all rows to display horizontally not vertically i.e. in the same line one after another instead of in next line. How can this be done? The headings and values, both should be repeated horizontally.
51545
Does anyone know how to make text align top-to-bottom in a div.  SO won't even let me demonstrate it . . . I just want the letters to stack on top of each other in a vertical line down the page like the stories of a building. Was hoping I didn't need to do it with an image.
38286
Problem:  I have searched how you can align text without the use of tables using LaTex. What I am after is to align images after each other on one side and text to align to respective image on the right hand side.  Example of problem:    Desired outcome:  Basically I am after to be able to align a photo and corresponding text exactly aligned horizontally to the middle of that photo. Each photo/text part should be divided by an arrow which is exactly aligned vertically in the middle of each photo.  I would appreciate if someone could give advice what the best practice is without using any tables.
117023
I have an HTML page with some textual spans marked up something like this:  ... &lt;span id="T2" class="Protein"&gt;p50&lt;/span&gt; ... &lt;span id="T3" class="Protein"&gt;p65&lt;/span&gt; ... &lt;span id="T34" ids="T2 T3" class="Positive_regulation"&gt;recruitment&lt;/span&gt; ...   I.e. each span has an ID and refers to zero or more spans via their IDs.  I would like to visualize these references as arrows.  Two questions:   How can I map an ID of a span to the screen coordinates of the rendering of the span? How do I draw arrows going from one rendering to another?   The solution should work in Firefox, working in other browsers is a plus but not really necessary. The solution could use jQuery, or some other lightweight JavaScript library.
81599
My only problem is making them line up three-across and have equal spacing. Apparently, spans can not have width and divs (and spans with display:block) don't appear horizontally next to each other. Suggestions?  &lt;div style='width:30%; text-align:center; float:left; clear:both;'&gt; Is what I have now.
26548
A client of mine is insisting on two things for a website I am designing:    That every single link is shown in the header – about 10 links or so with no sub-categories. ie. no drop-downs, rollovers, or sub-navigation.   That the header is always visible and static up the top. The content below it will scroll independently but the header is always up the top.    Now, to me, I don't like the idea of the navigation being always up the top. It means I have to go to lengths to reduce the height so that you can see enough content below it on smaller monitors. I believe that users know to find navigation up the top intuitively and don't need to have the nav forced on them at all times. In the client's eyes – this is "easier" – but in mine, it's treating the audience as stupid and smacks of Web 1.0 principles (namely frames).  So my question is – is it bad UX to have a fixed-position header?
14681
I want to insert a paragraph or possibly even a box with a background color into a list that uses the whole \textwidth. Something like this:  1st item     a subitem 1    b subitem 2  2nd item    a subitee  \begin{use the full width}    [ Here the text should use the full text width ignoring the list indent] \end{use the full width}    b subitem 3rd item   The list is a normal enumerate.
95682
How can i get the :hover in css stylesheet on the fly with jquery?  stupid example:   a.foo {     color: red;     font-size: 11px; }  a.foo:hover {     color: blue;     font-size: 12px;  }   how to retrieve that color and font-size before that mouse will go over the anchor?
7598
I'm posting today because I would like to reduce white space in a document I'm writing. The content is two-columns but I have floating tables that span across both columns (table*).   At some point, the text ends in the beginning of the first column of a new page. I would like to include my table on this page since it has a lot of free space below the text, but when I insert the table* right after the text, it goes to the top of the next page instead:    Do you know a way of obtaining the desired behavior?  Minimal working example :  \documentclass{article} \usepackage{lipsum}  \begin{document} \twocolumn  \paragraph{} \lipsum[1]  \begin{table*} \centering \begin{tabular}{|c|c|c|c|} \hline Column 1 &amp; Column 2 &amp; Column 3 &amp; Column 4 \\ \hline Column 1 &amp; Column 2 &amp; Column 3 &amp; Column 4 \\ \hline \end{tabular} \end{table*}%   \end{document}