#StackBounty: #javascript #html #css Javascript/CSS Animation displaying text information for a link

Bounty: 50

I am creating a CV website that includes my info about my research papers. And I wanted to create an animation where when you click on the button that says "Paper 1" an abstract info box pops-up and tells you the information for the paper.

Likewise when you click on "Paper 2" the abstract info box for that paper pops-up. I am sharing pictures below of what it would look like. I know this type of animation requires either CSS/Javascript. I am using a template of a sample website to create. Any ideas on how to actually do it? I appreciate your help.

                     <li>
                        <a href="javascript:void(0);" class="tm-gallery-link" data-filter="research_1">
                            <i class="fas fa-edit nav-icon"></i>
                             Paper 1
                        </a>
                    </li>


                        <figure class="effect-honey tm-gallery-item research1">
                            <p > This is a paragraph about my first research paper. Quisque tincidunt, sem rutrum euismod ornare, tortor arcu tempus lorem, accumsan suscipit mauris lorem at lorem. Praesent feugiat mi at tortor tincidunt, ac consequat ante cursus.</p>
                        </figure>

Clicking on Paper 1
enter image description here

Clicking on Paper 2
enter image description here


Get this bounty!!!

#StackBounty: #html #css #bootstrap-4 Hover on bootstrap card overlay

Bounty: 50

Just created an overlay on hover following a Youtube tutorial – but I adjusted some css to make it responsive.

I’d like to hear hear some reviews or suggestions where I can improve.

#Projects .card {
  position: relative;
  overflow: hidden;
}

#Projects .card:before {
  position: absolute;
  content: '';
  width: 80%;
  height: 220%;
  background:rgba(199, 0, 57, .9);
  top: -50%;
  left: -100%;
  z-index: 1;
  transform: rotate(20deg);
  transform-origin: center top 0;
  transition: .5s;
}

#Projects .card:hover:before {
  left: 10%;
}

#Projects .card .card-text {
  width: 100%;
  padding: 0 20px;
  position: absolute;
  top: -150%;
  color: #fff;
  left: 0;
  z-index: 2;
  transition: .5s;
}

#Projects .card:hover .card-text {
   top: 20%;
}


@media (max-width: 992px) {
  #Projects .card:hover .card-text {
    top: 15%;
 }

  #Projects  .card-text a {
    font-size: 11px;
  }

  #Projects .btn {
    padding: 5px 15px;
  }

  #Projects  .card-text h3 {
    font-size: 18px;
  }

  #Projects  .card-text h5 {
    font-size: 18px;
  }
  
  
}

@media (max-width: 575px) {


  #Projects .btn {
    padding: 5px 24px;
    font-size: 1.1rem;
  }

  #Projects  .card-text h3 {
    font-size: 1.5rem;
  }

  #Projects  .card-text h5 {
    font-size: 1.5rem;
  }
  

}
 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
    integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">

<section id="Projects">
  <div class="container">
    <div class="row">
      <div class="col-md-6 col-sm-6">
        <div class="card">
          <img class="card-img-top img-fluid" src="https://recruiterflow.com/blog/wp-content/uploads/2017/10/stackoverflow.png" alt="Card image cap">
          <div class="card-text">
            <h3>Project 1</h3>
            <h5>Some text...</h5>
            <a class="btn btn-primary" href="">View</a>
          </div>
        </div>

      </div>
      <div class="col-md-6 col-sm-6">
        <div class="card">
          <img class="card-img-top img-fluid" src="https://recruiterflow.com/blog/wp-content/uploads/2017/10/stackoverflow.png" alt="Card image cap">
          <div class="card-text">
            <h3>Project 2</h3>
            <h5>Some text...</h5>
            <a class="btn btn-primary" href="">View</a>
          </div>
        </div>
      </div>
    </div>
  </div>
 </section>


Get this bounty!!!

#StackBounty: #android #css #webview WebView not loading images nor css on some Android devices

Bounty: 100

I load html files on webview along with css applied using the following code:

@Override
protected void onCreate(Bundle savedInstanceState) {
     testWV = (WebView) findViewById(R.id.mywebview1);

     testWV.setDelegate(this);
     testWV.setApplicationLanguage(((iKitabApp) getApplication()).getLanguage());

     testWV.setVerticalScrollBarEnabled(false);
     testWV.setHorizontalScrollBarEnabled(false);
     testWV.getSettings().setSupportZoom(true);
     testWV.getSettings().setBuiltInZoomControls(true);
     testWV.getSettings().setDisplayZoomControls(false);

     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
         testWV.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
        );
     }
     testWV.getSettings().setJavaScriptEnabled(true);

}


new Thread(new Runnable() {
        @Override
        public void run() {
             testWV.post(new Runnable() {
                @Override
                public void run() {
                    
                    testWV.loadDataWithBaseURL(filePath,  htmlContent, "text/html", "UTF-8", "about:blank");
                }
            });
        }
});

Recently on some android devices as Galaxy 6 and note 10, the WebView is no longer loading the images in the WebView nor applying the css file which comes with it. While it’s still loading the whole content correctly on other android devices.

Kindly find below the result of the same html file on 2 different android devices

enter image description here
enter image description here

Would you kindly advise on the matter.


Get this bounty!!!

#StackBounty: #html #css #image #bootstrap-4 scale image on hover – unexpected behavior on mobile

Bounty: 50

I have an image i’d like to scale when hovering. My code works just fine on larger screen sizes, but on mobile, it is not working (image looks oddly scaled when I hover). I think it has to do with the image holder div, but when I try and set the max-width and height on mobile only, I still can’t get it to work. Any help appreciated! Thanks.

To replicate this issue – try viewing the following snippet in mobile, and hovering over the image (it will behave oddly):

.img-holder {
  max-width: 200px;
  max-height: 200px;
  overflow: hidden !important;
  border-radius: 50%;
  margin:0 auto
}

h4, p{
text-align:center
}

.bio-holder {
  padding-top:10px;
}

.img-fluid.d-block.mb-3.mx-auto.rounded-circle:hover{
        -webkit-transform: scale(1.1);
        -webkit-transition: all 0.125s ease-in-out 0s;
        -moz-transition: all 0.125s ease-in-out 0s;
        -ms-transition: all 0.125s ease-in-out 0s;
        -o-transition: all 0.125s ease-in-out 0s;
        transition: all 0.125s ease-in-out 0s;
    }
    
.bioName, .aboutHeading {
   color: #030b07;

}

.bioName {
   font-size: 35px;
}
<div class="col-6 col-md-4 p-4 staff-category"> 
  <div class="img-holder">
    <img class="img-fluid d-block mb-3 mx-auto rounded-circle" src="https://res.cloudinary.com/dxfq3iotg/image/upload/v1559454870/team-3.jpg" alt="Card image cap" width="200">
   </div>
   <div class="bio-holder">
    <h4 class="people_name"> <b class='bioNamePreview'>Ronald McDonald</b> </h4>
    <p class="mb-0">CEO and founder</p>
    </div>
</div>
            
            
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">


Get this bounty!!!

#StackBounty: #javascript #html #jquery #css Jquery custom scrollspy active nav item

Bounty: 50

I’m trying to make a custom scrollspy for a website.

When scroll down I want first of all make the nav fixed/sticky, that works perfectly. When scroll down further I try to make the current nav item active, by adding a class active.

But whatever I try I just can’t get that class active added to the nav item when we are at that specific section. I don’t get any errors whatsoever so I rerally don’t know anymore what I do wrong. I just can’t see it.

Is this perhaps the wrong approach or can someone see why it won’t get active?

$(function() {
  var $anchor = $('.product-menu');
  if ($anchor.length) {
    var $menuItems = $anchor.find('a'),
      $scrollItems = $menuItems.map(function() {
        var item = $($(this).attr("href"));
        if (item.length) {
          return item;
        }
      }),
      initPosition = $anchor.offset().top;
    $(window).scroll(function() {
      var htop = $('#header').outerHeight(true) - 1;
      if (initPosition != $anchor.offset().top && !$anchor.hasClass('sticky')) {
        initPosition = $anchor.offset().top;
      }
      if ($(window).scrollTop() >= initPosition - htop) {
        $anchor.addClass("sticky").css({
          top: htop
        });
      } else {
        $anchor.removeClass("sticky");
      }
      if ($anchor.length && $(window).width() > 768) {
        var cur = $scrollItems.map(function() {
          if ($(window).scrollTop() >= $(this).offset().top - $anchor.outerHeight() - $('#header').outerHeight()) return this;
        });
        cur = cur[cur.length - 1];
        var id = cur && cur.length ? cur[0].id : "";
        $menuItems.removeClass("active").end().filter("[href='#" + id + "']").addClass("active");
      }
    });
  }
});
#header {
  background: indianred;
  color: #fff;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 98;
  transition: all ease-in-out .25s;
  box-shadow: 0 5px 10px rgba(0,0,0,.05);
}

.product-menu {
  margin: 45px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  height:60px;
  line-height:60px;
  box-shadow: 0 5px 10px rgba(0,0,0,.05);
}

.product-menu.sticky {
  position: sticky;
  background: #fff;
  z-index: 9;
  width: 100%;
}

.list-inline {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0;
}

.list-inline li {
  margin: 0 5px;
}

.product-block {
  height: 300px;
  background: #eee;
  border: 1px solid #000;
}
<html>

<head>
  https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js
</head>

<body>
  <header id="header">
    <div class="header flex flex-align-center flex-between container">
      <div class="logo">
        <img src="" alt="Logo" width="" height="64" />
      </div>
    </div>
    <nav id="menu" class="nav list-inline">
      <ul class="list-inline container">
        <li><a href="#" class="goSmoothly">Main nav item</a></li>
        <li><a href="#" class="goSmoothly">Main nav item</a></li>
        <li><a href="#" class="goSmoothly">Main nav item</a></li>
        <li><a href="#" class="goSmoothly">Main nav item</a></li>
        <li><a href="#" class="goSmoothly">Main nav item</a></li>
      </ul>
    </nav>
  </header>
  <div class="some-container">
    <nav class="product-menu">
      <ul class="list-inline container">
        <li><a href="#description" class="goSmoothly">Product information</a></li>
        <li><a href="#specifications" class="goSmoothly">Specifications</a></li>
        <li><a href="#bundles" class="goSmoothly">Product bundles</a></li>
        <li><a href="#reviews" class="goSmoothly">Reviews</a></li>
        <li><a href="#related" class="goSmoothly">Related products</a></li>
      </ul>
    </nav>
    <div class="desc">
      <div id="description" class="product-block">description</div>
      <div id="specifications" class="product-block">specifications</div>
    </div>
    <div class="info">
      <div id="bundles" class="product-block">bundles</div>
      <div id="reviews" class="product-block">reviews</div>
    </div>
    <div id="related" class="product-block">related</div>
  </div>
</body>

</html>


Get this bounty!!!

#StackBounty: #javascript #html #css #angularjs #local-storage Copy and Paste Table Using ContentEditable

Bounty: 50

This video is a good representation of the issue I am facing: https://drive.google.com/file/d/1jN44lUpnbVDv_m3LuPhlJl6RFUu884jz/view. I cannot copy and paste a table from another a tab without it breaking down. Because this uses local storage, here is a JSFiddle: https://jsfiddle.net/znj537w0/1/.

var app = angular.module("TodoApp", ["LocalStorageModule", 'ngSanitize']);
app.controller("TodoController", function ($scope, localStorageService) {
    if (!localStorageService.get("taskListActive")) {
        $scope.tasksActive = [{
            text: "Do me next",
            priority: 1,
            complete: false
        },
        {
            text: "I'm not important",
            priority: 0,
            complete: false
        }
        ];
    } else {
        $scope.tasksActive = localStorageService.get("taskListActive");
    }

    if (!localStorageService.get("taskListComplete")) {
        $scope.tasksComplete = [{
            text: "I'm already done",
            priority: 0,
            complete: true
        }];
    } else {
        $scope.tasksComplete = localStorageService.get("taskListComplete");
    }

    $scope.totalTasks = function () {
        console.log($scope.tasksComplete.length);
        return $scope.tasksActive.length + $scope.tasksComplete.length;
    };

    $scope.totalRemaining = function () {
        return $scope.tasksActive.length;
    };

    $scope.totalComplete = function () {
        return $scope.tasksActive.length;
    };

    $scope.todoAdd = function () {
        if ($scope.taskInput.name) {
            $scope.tasksActive.unshift({
                text: $scope.taskInput.name,
                priority: $scope.taskInput.priority || 0,
                complete: false
            });
            $scope.taskInput.name = "";
            $scope.taskInput.priority = 0;
        }
    };

    $scope.togglePriority = function (task) {
        if (task.priority === 0) {
            task.priority = 1;
            console.log("a");
        } else {
            task.priority = 0;
        }
    };

    $scope.completeTask = function (task) {
        //var task = $scope.tasksActive[index];
        task.complete = true;
        task.priority = 0;
        $scope.tasksActive.splice($scope.tasksActive.indexOf(task), 1);
        $scope.tasksComplete.unshift(task);
    };

    $scope.uncompleteTask = function (task) {
        task.complete = false;
        $scope.tasksComplete.splice($scope.tasksComplete.indexOf(task), 1);
        $scope.tasksActive.unshift(task);
    };

    $scope.deleteTask = function (task, list) {
        if (list == "active") {
            $scope.tasksActive.splice($scope.tasksActive.indexOf(task), 1);
        } else {
            $scope.tasksComplete.splice($scope.tasksComplete.indexOf(task), 1);
        }
    };

    $scope.clearCompleted = function () {
        var deleteArr = [];
        for (var i = 0; i < $scope.tasksComplete.length; i++) deleteArr.push(i);
        for (var i = 0; i < deleteArr.length; i++) {
            var task = i;
            $scope.tasksComplete.splice($scope.tasksComplete.indexOf(task) - 1, 1);
        }
    };

    $scope.$watch(
        "tasksActive",
        function (newVal, oldVal) {
            console.log("tasksActive");
            if (newVal !== null && angular.isDefined(newVal) && newVal !== oldVal) {
                localStorageService.add("taskListActive", angular.toJson(newVal));
            }
        },
        true
    );

    $scope.$watch(
        "tasksComplete",
        function (newVal, oldVal) {
            console.log("tasksComplete");
            if (newVal !== null && angular.isDefined(newVal) && newVal !== oldVal) {
                localStorageService.add("taskListComplete", angular.toJson(newVal));
            }
        },
        true
    );

    $scope.contentEdit = function (event, task) {
        const newText = event.target.innerText;
        if (newText && task) {
            task.text = newText;
            console.log(event.target.innerText);
        }
    }
});

const newText = event.target.innerHTML;
*,
*:before,
*:after {
  box-sizing: border-box;
}

.max-width {
  max-width: 600px;
}

.centered {
  margin: auto;
}

.text-center-h {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.list-no-style {
  list-style: none outside none;
  padding-left: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  color: #333;
  padding: 20px 20px 20px 10px;
}

html {
  font-size: 10px;
}

body {
  font-size: 1.6rem;
  background: linear-gradient(45deg, #bbdefb 0%, #311b92 100%);
}

p {
  white-space: pre-wrap;
  margin: 1em;
  color: #777;
}

.block {
  font-size: 0;
  margin-bottom: 24px;
}

.block>* {
  font-size: medium;
  display: inline-block;
  vertical-align: top;
}

.block-justify {
  text-align: justify;
}

.block-justify:after {
  content: '';
  display: inline-block;
  width: 100%;
}

.block-justify>* {
  display: inline-block;
  vertical-align: top;
}

.block-table {
  display: table;
  table-layout: fixed;
  width: 100%;
}

.block-table>* {
  display: table-cell;
}

.fa {
  font-size: 2rem;
  color: #bbb;
  padding: 0 6px;
  transition: color 0.2s ease;
}

.fa.-clickable {
  cursor: pointer;
}

button.-add,
.btn.-add {
  border: none;
  padding: 5px 0 0;
  border-bottom: 3px solid #0eb2f0;
  background: #56c9f5;
  transition: all 0.1s ease;
}

button.-add:hover,
.btn.-add:hover {
  background: #6ed1f6;
}

button.-add:active,
.btn.-add:active {
  border-bottom-width: 1px;
}

button.-clear,
.btn.-clear {
  border: none;
  padding: 0;
  background: none;
  color: #bbb;
}

button.-clear:hover,
.btn.-clear:hover {
  color: tomato;
}

.task-list._wrap {
  background: #fff;
  padding: 20px;
  margin-top: 50px;
  margin-bottom: 50px;
  box-shadow: 18px 18px 0 0 #56c9f5;
}

.task-list._wrap h1 {
  font-size: 5rem;
}

.totals._wrap,
.search {
  vertical-align: bottom;
}

.totals._wrap {
  font-size: 0;
}

.totals._grand-total,
.totals._detail {
  display: inline-block;
  vertical-align: top;
  font-size: medium;
}

.totals._grand-total {
  text-align: center;
  height: 90px;
  padding: 6px 12px;
  background: #64b5f6;
  color: #fff;
  overflow: hidden;
}

.totals._grand-total span {
  display: block;
}

.totals._total-number {
  font-size: 3rem;
}

.totals._detail p {
  height: 60px;
  padding: 3px 6px;
}

.search._wrap {
  position: relative;
}

.search .fa {
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
}

.search input.-text {
  padding-left: 30px;
}

.add-form._wrap {
  position: relative;
  height: 80px;
  padding: 12px;
  border: 1px solid #694ede;
  box-shadow: 3px 3px 0 0 #694ede;
}

.add-form input[type="text"] {
  width: 100%;
}

.add-form._buttons {
  position: absolute;
  right: 12px;
  padding: 2px;
  width: 180px;
  font-size: 0;
}

.add-form._checkbox-wrap,
.add-form._submit-button {
  display: inline-block;
  vertical-align: middle;
  font-size: medium;
  height: 100%;
}

.add-form._checkbox {
  padding: 0 12px;
}

.add-form._checkbox input {
  visibility: hidden;
}

.add-form._checkbox .fa:hover {
  color: #7b7b7b;
}

.add-form._checkbox input:checked+.fa {
  color: tomato;
}

.add-form._submit-button {
  height: 42px;
  padding: 0 20px;
}

input.-text {
  padding: 6px 12px;
  height: 46px;
}

input.-add-task {
  border: none;
  border: 2px solid #64b5f6;
}

input.-search {
  border: 2px solid #64b5f6;
}

.task._item {
  background: #fff;
  box-shadow: 3px 3px 0 0;
  border: 1px solid;
  overflow: auto;
  margin-bottom: 6px;
}

.task._item a {
  text-decoration: none;
}

.task.-done-false {
  color: #56c9f5;
}

.task.-done-false p,
.task.-done-false a {
  color: #333;
}

.task.-done-true {
  color: #d5d5d5;
}

.task.-done-true p,
.task.-done-true a {
  color: #bbb;
}

.task._task-left,
.task._task-right {
  height: 66px;
  padding: 10px;
}

.task._task-left {
  width: calc(100% - 180px);
  margin-bottom: 15px;
  height: 100px;
  overflow: auto;
}

.task._task-right {
  width: 180px;
  overflow: auto;
}

.task._task-right .btn {
  display: inline-block;
  margin-top: 3px;
  margin-bottom: 15px;
}

.task._task-right .btn.-priority:hover .fa {
  color: #7b7b7b;
}

.task._task-right .btn.-complete:hover .fa,
.task._task-right .btn.-re-open:hover .fa {
  color: #0eb2f0;
}

.task._task-right .btn.-clear:hover .fa {
  color: tomato;
}

.task.-task-priority-high ._task-left {
  padding-left: 28px;
  position: relative;
}

.task.-task-priority-high ._task-left:before {
  position: absolute;
  content: '';
  width: 6px;
  top: 12px;
  bottom: 12px;
  left: 12px;
  background: tomato;
}

.task.-task-priority-high .btn.-priority .fa {
  color: tomato;
}

p {
  margin: 1em;
  color: #777;
}

p.changed {
  color: black;
}

button {
  margin: 0 1em;
}

.btn {
  display: inline-block;
  *display: inline;
  padding: 4px 10px 4px;
  margin-bottom: 0;
  *margin-left: 0.3em;
  font-size: 13px;
  line-height: 18px;
  *line-height: 20px;
  color: #333;
  text-align: center;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
  vertical-align: middle;
  cursor: pointer;
  background-color: #f5f5f5;
  *background-color: #e6e6e6;
  background-image: -ms-linear-gradient(top, #fff, #e6e6e6);
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#e6e6e6));
  background-image: -webkit-linear-gradient(top, #fff, #e6e6e6);
  background-image: -o-linear-gradient(top, #fff, #e6e6e6);
  background-image: linear-gradient(top, #fff, #e6e6e6);
  background-image: -moz-linear-gradient(top, #fff, #e6e6e6);
  background-repeat: repeat-x;
  border: 1px solid #ccc;
  *border: 0;
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  border-color: #e6e6e6 #e6e6e6 #bfbfbf;
  border-bottom-color: #b3b3b3;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
  filter: progid:dximagetransform.microsoft.gradient(enabled=false);
  *zoom: 1;
  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn:hover {
  background-color: #e6e6e6;
  *background-color: #d9d9d9;
  color: #333;
  text-decoration: none;
  background-color: #e6e6e6;
  *background-color: #d9d9d9;
  background-position: 0 -15px;
  -webkit-transition: background-position 0.1s linear;
  -moz-transition: background-position 0.1s linear;
  -ms-transition: background-position 0.1s linear;
  -o-transition: background-position 0.1s linear;
  transition: background-position 0.1s linear;
}

.btn:active {
  background-color: #e6e6e6;
  *background-color: #d9d9d9;
  background-color: #ccc 9;
  background-color: #e6e6e6;
  background-color: #d9d9d9 9;
  background-image: none;
  outline: 0;
  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
  -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn:first-child {
  *margin-left: 0;
}

.btn:focus {
  outline: thin dotted #333;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}

.btn.active {
  background-color: #e6e6e6;
  *background-color: #d9d9d9;
  background-color: #ccc 9;
  background-color: #e6e6e6;
  background-color: #d9d9d9 9;
  background-image: none;
  outline: 0;
  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
  -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn.disabled {
  background-color: #e6e6e6;
  *background-color: #d9d9d9;
}

.btn[disabled] {
  background-color: #e6e6e6;
  *background-color: #d9d9d9;
}

.btn-primary {
  background-color: #0074cc;
  *background-color: #05c;
  background-image: -ms-linear-gradient(top, #08c, #05c);
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#05c));
  background-image: -webkit-linear-gradient(top, #08c, #05c);
  background-image: -o-linear-gradient(top, #08c, #05c);
  background-image: -moz-linear-gradient(top, #08c, #05c);
  background-image: linear-gradient(top, #08c, #05c);
  background-repeat: repeat-x;
  border-color: #05c #05c #003580;
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#0088cc', endColorstr='#0055cc', GradientType=0);
  filter: progid:dximagetransform.microsoft.gradient(enabled=false);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-primary:hover {
  background-color: #05c;
  *background-color: #004ab3;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-primary:active {
  background-color: #05c;
  *background-color: #004ab3;
  background-color: #004099 9;
}

.btn-primary.active {
  background-color: #05c;
  *background-color: #004ab3;
  background-color: #004099 9;
  color: rgba(255, 255, 255, 0.75);
}

.btn-primary.disabled {
  background-color: #05c;
  *background-color: #004ab3;
}

.btn-primary[disabled] {
  background-color: #05c;
  *background-color: #004ab3;
}

.btn-warning {
  background-color: #faa732;
  *background-color: #f89406;
  background-image: -ms-linear-gradient(top, #fbb450, #f89406);
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
  background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
  background-image: -o-linear-gradient(top, #fbb450, #f89406);
  background-image: -moz-linear-gradient(top, #fbb450, #f89406);
  background-image: linear-gradient(top, #fbb450, #f89406);
  background-repeat: repeat-x;
  border-color: #f89406 #f89406 #ad6704;
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);
  filter: progid:dximagetransform.microsoft.gradient(enabled=false);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-warning:hover {
  background-color: #f89406;
  *background-color: #df8505;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-warning:active {
  background-color: #f89406;
  *background-color: #df8505;
  background-color: #c67605 9;
}

.btn-warning.active {
  background-color: #f89406;
  *background-color: #df8505;
  background-color: #c67605 9;
  color: rgba(255, 255, 255, 0.75);
}

.btn-warning.disabled {
  background-color: #f89406;
  *background-color: #df8505;
}

.btn-warning[disabled] {
  background-color: #f89406;
  *background-color: #df8505;
}

.btn-danger {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-danger:hover {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-success {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-success:hover {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-info {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-info:hover {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-inverse {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-inverse:hover {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.btn-danger.active {
  color: rgba(255, 255, 255, 0.75);
}

.btn-success.active {
  color: rgba(255, 255, 255, 0.75);
}

.btn-info.active {
  color: rgba(255, 255, 255, 0.75);
}

.btn-inverse.active {
  color: rgba(255, 255, 255, 0.75);
}
https://code.jquery.com/jquery-3.5.1.min.js
https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.0/angular.min.js
https://s3-us-west-2.amazonaws.com/s.cdpn.io/131045/ngLocalStorage.js
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
</link>
<div ng-app="TodoApp" ng-controller="TodoController" class="task-list _wrap centered max-width text-center-h ng-scope"style="font-family: Arial, sans-serif;">
    <h1 style="font-family: Arial, sans-serif;">Notes:</h1>
    <div class="block-justify" style="position: relative; left: -153px; top: -14px;">
        <div class="totals _wrap text-left">
            <div class="totals _detail">


            </div>
        </div>
        <div class="search _wrap text-right">
            <input class="input -text -search" type="text" placeholder="Search tasks" ng-model="taskSearch.name" />
            <i class="fa fa-search"></i>
        </div>
    </div>

    <form class="add-form _wrap block text-left">
        <input class="input -text -add-task" type="text" placeholder="Add a new task" ng-model="taskInput.name" ng-model-instant />
        <div class="add-form _buttons text-right">
            <p>Priority</p>
            <div class="add-form _checkbox-wrap">
                <label class="add-form _checkbox"><input class="input -checkbox" type="checkbox" name="priority"
                                ng-model="taskInput.priority" ng-init="checked=false" parse-int ng-true-value="1"
                                ng-false-value="0"></i></label>
            </div>
<button class="add-form _submit-button btn -add" ng-click="todoAdd()" style="position: relative; left: 18px; top: -3px; height: 47px; transform-origin: 50% 78%;">Add</button>
        </div>
    </form>

    <ul class="list-no-style text-left">
        <li ng-repeat="task in tasksActive | filter:taskSearch.name | orderBy:'-priority'"
            class="task _item -done-{{ task.complete }} -task-priority-{{ task.priority==true ? 'high' : 'low' }} block-table">
            <div class="task _task-left" ;>
                <p id="myText" contenteditable class="changed"
                ng-on-blur="contentEdit($event, task)" 
                ng-bind-html="task.text"></p>
            </div>
            <div class="task _task-right text-right">
                <a href ng-click="togglePriority(task)" class="btn -task-action -priority"
                    title="Change priority"><i class="fa fa-exclamation"></i></a>
                <a href ng-click="completeTask(task)" class="btn -task-action -complete" title="Complete"><i
                                class="fa fa-check"></i></a>
                <a href ng-click="deleteTask(task,'active')" class="btn -clear" title="Delete"><i
                                class="fa fa-times-circle"></i></a>

            </div>
        </li>
        <li ng-repeat="task in tasksComplete | filter:taskSearch.name"
            class="task _item -done-{{ task.complete }} block">
            <p style="white-space: pre-wrap;" class="task _task-left">{{ task.text }}</p>
            <div class="task _task-right text-right">
                <a href ng-click="uncompleteTask(task)" class="btn -task-action -re-open" title="Re-open"><i
                                class="fa fa-undo"></i></a>
                <a href ng-click="deleteTask(task,'complete')" class="btn -clear" title="Delete"><i
                                class="fa fa-times-circle"></i></a>
            </div>
        </li>
    </ul>

    <form class="text-right">
        <button class="btn -clear" ng-show="tasksComplete.length" ng-click="clearCompleted()">Delete all
                    completed</button>
    </form>
</div>

https://cdnjs.cloudflare.com/ajax/libs/angular-sanitize/1.8.0/angular-sanitize.min.js


Get this bounty!!!

#StackBounty: #css #google-chrome #ionic-framework #firefox #computed-style applied CSS rule for opacity is different from the computed…

Bounty: 50

I’m inspecting https://ionicframework.com/docs/api/alert alert..

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Alert</title>
  https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.esm.js
  https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.js
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ionic/core/css/ionic.bundle.css"/>
  <style>
    :root {
      --ion-safe-area-top: 20px;
      --ion-safe-area-bottom: 22px;
    }
  </style>
  <script type="module">
    import { alertController } from 'https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/index.esm.js';
    window.alertController = alertController;
  </script>
</head>
<body>
  <ion-app>
    <ion-header translucent>
      <ion-toolbar>
        <ion-title>Alert</ion-title>
      </ion-toolbar>
    </ion-header>,
    <ion-content fullscreen class="ion-padding">
      <ion-alert-controller></ion-alert-controller>
      <ion-button expand="block">Show Alert</ion-button>
    </ion-content>
  </ion-app>

  <script>
    const button = document.querySelector('ion-button');
    button.addEventListener('click', handleButtonClick);

    async function handleButtonClick() {
      const alert = await alertController.create({
        header: 'Use this lightsaber?',
        message: 'Do you agree to use this lightsaber to do good across the galaxy?',
        buttons: ['Disagree', 'Agree']
      });

      await alert.present();
    }
  </script>
</body>
</html>

There is an element there with .alert-wrapper class on it.

if you’ll look at the applied CSS, it will show you opacity: 0, but the computed shows opacity: 1
the element i'm inspecting

applied css

computed styles

I tried removing all the CSS Files from the page, all the javascript, all the other elements
I tried to move this element to the body (outside the iframe) and applying the opacity: 0 in the styles, nothing helps, the computed stays opacity: 1..

How is this possible?


Get this bounty!!!

#StackBounty: #html #css #reactjs #iframe Layout Shrinking When The Page Has An Iframe

Bounty: 50

I have a React website (based on Next.js) for which I wrote a React component to embed Tweets. But when a page contains a tweet, the layout shrinks. I have figured out that it happens when there is an iframe on the page as the Twitter API loads an iframe.

I have no clue what is happening and why my viewport settings are not being respected.

Viewport

<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"/>

Ideal Layout

Ideal layout

Shrunken layout (when there is a tweet on the page). Notice the toolbar and text size(s).

Shrunken layout

PS: The same thing happens, if I embed a YouTube video.


Get this bounty!!!

#StackBounty: #html #css #html5 Example of responsive webpage

Bounty: 50

So I’m doing a coursera asignment on a html-css course. The assignment is to do a simple responsive page, which can be found here.

I think I came up with a solution, but I ended up having around 100 lines for the stylesheet, so I suppose that there is some ways to achieve the desired layouts in a more intuitive and easy way. I want a little bit of feedback on what I can improve here.

* {
    font-family: "Comic Sans MS", cursive, sans-serif;
    box-sizing: border-box;
}

h1{
    text-align: center;
}


.sign_fs{
    position: relative;
    width: 50%;
    min-width: fit-content;
    padding: 5px 10px 5px 10px;
    border: 5px solid black;
    float: right;
    font-size: 20px;
    text-align: center;
    margin-top: -2px;
    margin-right: -2px;
}

#chicken {
    background-color: pink;
}

#beef {
    background-color: slateblue;
}

#sushi{
    background-color: skyblue;
}

@media (min-width: 992px) {
    .text_fs {
        font-size: 15px;
        clear: both;
        margin: 1%;
        padding: 1%;
    }

    .div_fs {
        background-color: grey;
        border: 2px solid black;
        width: 31.2%;
        margin: 1%;
        float: left;
    }

}

@media(max-width: 992px) and (min-width:768px) {
    .text_fs {
        font-size: 15px;
        clear: both;
        margin: 1%;
        padding: 1%;
    }

    .div_tablet_top {
        background-color: grey;
        border: 2px solid black;
        width: 48%;
        margin: 1%;
        float: left;
    }

    .div_tablet_bot {
        background-color: grey;
        border: 2px solid black;
        width: 98%;
        margin: 1%;
        float: left;
    }

    #sushi{
        width: 20%;
    }
}

@media (max-width: 768px) {
    section {
        margin: 10px;
        padding-top: 0px;
    }

    .div_mobile{
        background-color: grey;
        border: 2px solid black;
        margin: 1%;
        margin-top: 20px;
        padding: 10px;

    }
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Module 2 solution</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <h1>Our Menu</h1>
    <section>
        <div class="div_fs div_tablet_top div_mobile">
            <div class="sign_fs" id="chicken">Chicken</div>
            <div class="text_fs" >
                Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
            </div>
        </div>
        <div class="div_fs div_tablet_top div_mobile">
            <div class="sign_fs" id="beef">Beef</div>
            <div class="text_fs" >
                Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
            </div>
        </div>        
        <div class="div_fs div_tablet_bot div_mobile">
            <div class="sign_fs" id="sushi">Sushi</div>
            <div class="text_fs">
                Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
            </div>
        </div>
    </section>
</body>
</html>


Get this bounty!!!