I'm trying to create a nav bar with a search bar within the nav bar. The problem is that the background color behind the unordered list part of the nav bar is just white like the rest of the page. Shouldn't it be the background color I set it to? HTML  &lt;div class="topnav"&gt;     &lt;ul&gt;         &lt;li&gt;&lt;a routerLink="/"&gt; Home &lt;/a&gt;&lt;/li&gt;         &lt;li&gt;&lt;a routerLink="/"&gt; Home &lt;/a&gt;&lt;/li&gt;     &lt;/ul&gt;      &lt;div class="searchbar input-group col-md-4"&gt;         &lt;input class="form-control py-2" type="search" placeholder="Search..." id="example-search-input"&gt;         &lt;span class="input-group-append"&gt;             &lt;button class="btn btn-outline-secondary" type="button"&gt;                 &lt;i class="fa fa-search"&gt;&lt;/i&gt;             &lt;/button&gt;         &lt;/span&gt;     &lt;/div&gt;  &lt;/div&gt;   CSS   ul {   list-style-type: none;   margin: 0;   padding: 0;   border: 1px solid #e7e7e7;   background-color: #f3f3f3; }  li {   float: left; }  li a {   display: block;   color: #666;   text-align: center;   padding: 14px 16px;   text-decoration: none; } .searchbar {   float:right;   background-color: #f3f3f3; } .topnav {   border: 1px solid #e7e7e7;   background-color: #f3f3f3; }
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?
What does this phrase from The adventures of Tom Sawyer sentence mean: "True, the knife would not cut anything, but it was a "sure-enough" Barlow, and there was inconceivable grandeur in that -- though where the Western boys ever got the idea that such a weapon could possibly be counterfeited to its injury is an imposing mystery and will always remain so, perhaps."  Thank you! Delaunay triangulation to generate abstract networks and nodes So I have this word problem and I’m a bit confused about it. I have the answer and explanation but I still don’t understand: The half-life of carbon-14 is approximately 5730 years, while the half-life of carbon-12 is essentially infinite. If the ratio of carbon-14 to carbon-12 in a certain sample is 25% less than the normal ratio in nature, how old is the sample?     A. Less than 5730 years      B. Approximately 5730 years      C. Significantly greater than 5730 years, but less than 11460 years      D. Approximately 11460 years  Correct Answer: A Explanation: Because the half-life of carbon-12 is essentially infinite, a 25 percent decrease in the ratio of carbon-14 to carbon-12 means the same as a 25 percent decrease in the amount of carbon-14. If less than half of the carbon-14 has deteriorated, then less than one half-life has elapsed. Therefore, the sample is less than 5730 years old. Be careful with the wording here—the question states that the ratio is 25% less than the ratio in nature, not 25% of the ratio in nature, which would correspond to choice (D). How is the ratio of the carbon isotopes relevant to half-lives? What is the purpose of saying the half-life of an isotope is infinite? What is meant by “the normal ratio in nature”? Just based on the answer, it seems like the question said “25% of a carbon sample decayed, how old is this sample?” Obviously it’s younger than 5,730 years (the time for its first half life) because if only 25% decayed that means half a half-life has passed. I don’t see how isotopes and ratios would change this problem at all. Edit: Every answer here was very informative and helpful. It was tough to pick a best answer. I picked Cosma’s because it clicked with me. If you’re reading this and want to understand radiocarbon dating, look at every answer because there is some useful information in every answer How to sum a variable by group What is syntax highlighting and how does it work? I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange? How to keep VLC player in minimized mode? I'm using VLC media player which can play almost all kinds of audio and video formats. While listening to audio, I keep VLC in minimized mode and can work on other windows. But when I select to listen video songs mixing with audio songs, VLC is maximizing itself to play every video song in the playing list, which is really annoying in the middle of work.  So how can I keep always VLC player in minimized mode while playing a list of songs mixed with audio and video songs? If $\tan(\frac{\pi}{4}+\frac{y}{2})=\tan^3(\frac{\pi}{4}+\frac{x}{2})$,then prove that $\sin y=\frac{\sin x(3+\sin^2 x)}{(1+3\sin^2 x)}$ If $\tan(\frac{\pi}{4}+\frac{y}{2})=\tan^3(\frac{\pi}{4}+\frac{x}{2})$,then prove that $\sin y=\frac{\sin x(3+\sin^2 x)}{(1+3\sin^2 x)}$    $\tan(\frac{\pi}{4}+\frac{y}{2})=\tan^3(\frac{\pi}{4}+\frac{x}{2})$ $\frac{1+\tan\frac{y}{2}}{1-\tan\frac{y}{2}}=(\frac{1+\tan\frac{x}{2}}{1-\tan\frac{x}{2}})^3$ Applying componendo and dividendo rule on both sides, $\tan\frac{y}{2}=\frac{\tan\frac{x}{2}(3+\tan^2\frac{x}{2})}{(1+3\tan^2\frac{x}{2})}$ I am stuck here. Rules for refreezing food What are the general rules regarding when can you refreeze food that was frozen and then thawed in the fridge? and what are the reasons behind them? (Hygiene? Food quality?). Let's assume for the sake of the argument that the items were in a non-frozen state only a few hours.  To be more specific, I'm interested in the application of these rules for  - Ginger garlic paste - Dough - Indian Curries - Green Chilly paste - Frozen green peas Any difference between "Good morning, Brian" and "Good morning to you, Brian" I often hear it on TV when they are talking to a guest.  Normally, if we want to greet Brian in morning, we would say "Good Morning Brian". But many times TV presenters say "Good morning to you Brian".  Why is that? Why do they add "to you". There seems to be no need to do it.  Regards, In the Peter Jackson movie, once the One Ring is thrown into the volcano in Mount Doom, why does the mountain and tower collapse, and the ground disappears everywhere where the orcs are standing but not where the humans are? Where are all the orcs running to, what do they do next? Ubuntu 20.04 graphics driver problem I have upgraded from Ubuntu 19.10 to 20.04, and now I have a problem with my graphics rendering (strange squares on background and font problems). I use the i915 driver. Graphics card: Skylake GT2 HD Graphics 520. I tried to reinstall GNOME shell and Xorg server. Nothing helped. Also Chrome browser breaks on most of pages. As far as I know, it's possible to create a radially polarised ring magnet, where one pole is on the inside, and the field lines cross the circumference at right angles.    So imagine if I made one which was shaped like a sector of a torus.    Then I forced a load of these magnets into a complete torus.     Clearly this magnet is impossible because there's no way for the field lines to get back into the middle. So what happens to the field in this case? Does it disappear completely? Do the magnets blow up? Using headset controls like a smart phone I have a generic pair of smartphone earphones that have the button (along with a microphone) and I would like to use the button as a pause/play key in Ubuntu, like I would on an Android phones music player.  Is there a way to enable this headset control in Ubuntu?  If the headset controls are a hardware feature of audio jacks used in Android phones, the name of that hardware (audio jack) would be appreciated. How to break the Y axis in an Excel sheet I want to break the Y-axis in an Excel sheet. How can I do that?  For example, suppose I have the data in a range from 0-7000 and then range from 22000-28000. I want a break in the Y axis from 8000-20000. Acne underneath skin Introduction  Okay, I've almost won my war. The battle, its almost won... However, I must still claim victory in my final battle. The battle against the little enemies, the ones that have fought with my blade of benzoyl peroxide every single day.  Problem  Through spot treatments I have been able to fell every single one of these spots, but only the ones on my face. I've been using a spot treatment with benzoyl peroxide in, which has worked really well for me. However, my issue comes here:     There are spots underneath my skin, I think. The areas where they come through are a bit red.   So, because there is still slightly red skin on my face, and I think this is causing my acne to constantly return. I need to stop this, and end my war once and for all.  What I've tried   Washing my face with a rag and sponge every day, three times a day Changing my pillow case every day Using a benzoyl peroxide spot treatment Minimizing how much I touch my face Not interfering with the spots with my fingers, not picking at them, not playing with them. Just letting spot creams eradicate them.   Conclusion  Seriously, this driving me up the wall. I spot cream in the evening, by the time tomorrow has ended and its time for a shower, they've all come back. Its like they're coming in waves, damn waves! I must put an end to this.  So, how can I prevent acne from coming back within the space of a single school day? How can I get rid of these once and for all? What types of measures could I try? I have no reason to visit my doctor, its only acne, but I have no idea what I can try now.  Is there even a point in me trying? I acknowledge that I am a teenager, but no others that I know seem to have acne/spots like I do. It has been some months since I've turned on my Playstation 3. Today, when I turned it on with my controllers, it didn't work. I thought "Hey, the battery surely ran out", so I tried to charge them but they don't seem to be charging at all. Could it be that they're officially weight papers by now? Get display resolution from the command line for Linux Desktop Does Blender support any form of collaborative editing? Stack Exchange API too many requests from this IP address I am using the Stack Exchange API to get Stack&nbsp;Overflow data, but I am getting "too many request from this ip" after making only five requests. I got JSON content like this:  {u'error_id': 502, u'error_message': u'too many requests from this IP, more requests available in 68492 seconds', u'error_name': u'throttle_violation'}   I made the following requests to Stack&nbsp;Exchange without an access token:   "" ---> 2 times called this API "" --> 3 times called this API and on the 4th call I got an exception Number of possible marriage arrangements if Marriage Condition is satisfied Suppose I have a set of $n$ boys and each subset of $1\leqslant k \leqslant n$ boys knows at least $k$ girls then this means that the set of boys $B$ satisfies the marriage condition.  I am doing an exercise from a Graph Theory book and it says we can show by induction on $n$ that the number of possible marriage arrangements is $\geqslant t!$ if every individual boy knows at least $t \leqslant n$ girls or there are $\geqslant t!/(t-n)!$ possible marriages if each individual boy knows at least $t&gt;n$ girls.   I am struggling to see how the induction hypothesis can be implemented to prove the $n+1$ case. When you swap from the $n$ to $n+1$ case the conditions change and I can't see the link between them.  Would anyone be able to point me in the right direction?