css

How do I make two buttons side by side and responsive?

故事扮演 提交于 2021-02-19 03:49:05
问题 I have a small task where it requires the two buttons side by side when using a desktop, and then when on mobile they are stacked on top of each other but have not decreased in size. I have managed to make them stack on top of each other but they are different sizes? Whenever I defined the % size of the buttons it makes them squish together and look hideous when in device view. .button { background-color: #f2f2f2;; border: none; color: #737373; padding: 15px 32px; text-align: center; text

Live search for accordions and its content

£可爱£侵袭症+ 提交于 2021-02-19 03:48:14
问题 I have a list of accordions in my html page and i would like to have a search box for filtering the accordions and its contents. Basically i would like to create a search box for all the accordions but i also want to search for the contents inside the accordions. Sorry if my question is not clear but this is my first question on Stackoverflow. Below the code is for how i am creating the accordions and how i show them when the user press one title. (i have created one accordion in the html and

CSS folded corners of div with shadow

眉间皱痕 提交于 2021-02-19 03:43:13
问题 I have div blocks with rounded corners box-shaddow: .itemapplication { position:relative; overflow:hidden; border-radius: 10px; width: 180px; height: 225px; float: left; box-shadow: 0px 5px 1px 0px #bfc4c8; } and I want to make corner fold. Here is my code so far: .itemapplication:before { content:""; position:absolute; top:-1px; right:-1px; border-style:solid; border-width:20px; border-color:#eceff4 #eceff4 red red; -webkit-border-bottom-left-radius:10px; -moz-border-radius:0 0 0 10px;

Defining CSS style for tooltip in d3.js body

断了今生、忘了曾经 提交于 2021-02-19 03:38:18
问题 I'm wondering if its possible to define a CSS style for a tooltip function displayed by d3.js on mouse over event in the actual body of the definition rather than on top of the page in the style section. JAVASCRIPT: var tooltip = d3.select("#scatter-load").append("div") .attr("class", "tooltip") //.attr("position", "absolute") //.attr("width", "200px") //.attr("height", "30px") //.attr("pointer-events", "none") .style("opacity", 0); chocolateGroup.append("circle") .attr("r", function(d)

want to hide/show navbar when scroll down/up using js or jquery

蹲街弑〆低调 提交于 2021-02-19 03:22:08
问题 I simply want to hide navbar when scroll down and show when scroll up so i am adding what i have done but i am unable to acheive it, thanks in advance :) my html code for navbar <div class="nav-scroll"> <nav class="navbar navbar-default navbar-fixed-top"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span

Selenium: Iterate Through Element List

纵饮孤独 提交于 2021-02-19 03:11:12
问题 I am using XPath/CSS and Selenium to locate elements on website. I want to create a method where I iterate through a list of locators (XPath / CSS) and program chooses whichever one works. In other words, it begins with locator one - if the locator is present it returns true and exists the loop. Otherwise it moves on to the next locator in list. Once it exhausts all CSS locators it moves on to XPath and so on. Currently, I am thinking of implementing this as follows: public boolean iterate

Horizontally center an element and put another element to the right of it

╄→гoц情女王★ 提交于 2021-02-19 02:58:07
问题 As the title suggests, I am trying to horizontally center an element and put another element to the right of it WITHOUT centering both elements. I only want ONE of the two elements to be centered, while the other one is to the right of it (and on the same line in this case). The following is the closest that I can get, but BOTH elements are centered as opposed to just the element containing 'CENTER'. I want 'CENTER' to be centered and 'right' to be to the right of it: <div style="text-align

Flexbox wkhtmltopdf Rendering Issue

自作多情 提交于 2021-02-19 02:52:10
问题 I have a page that I am turning into a pdf with wkhtmltopdf. I have a 3 column layout and it works well in Chrome but the pdf is incorrectly generated. Is there an alternative to flexbox that would give the same view or a way to make flexbox work in wkhtmltopdf? Modernizr did not help. Thanks. HTML: <div class="header"> <div id="name" class="center"> <h2> Centered Text </h2> </div> <div id="links" class="left"> <h3> Left Line 1 <br> Left Line 2 </h3> </div> <div id="contact" class="right">

Why are the results of img width different in some browsers? Who is correct?

血红的双手。 提交于 2021-02-19 02:45:15
问题 This has a demo: <div style="position:absolute;"> <img src="https://i.imgur.com/iQ2rVup.jpg" style="width:100%;height:100px;" /> </div> On Codepen Chrome result: Firefox/IE result: I saw the W3C document. Absolutely locate non-displaced elements are calculated as follows. min(max(preferred minimum width, available width), preferred width) https://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-width Is the result of chrome wrong? 回答1: This will probably not answer the question but I will try

Make just one section scrollable, not the entire page

安稳与你 提交于 2021-02-19 02:44:40
问题 I am working on a project in which one of the sections is filled with elements by requesting data from the database, therefore the number of elements in it is extremely variable. The tricky part is that our design is based on the idea of not having to scroll on the page, but instead scroll on the sections if it is necessary. I thought using overflow on the sections would suffice but it does not give me the intended result. I tried all of the variations of the overflow property, scroll