[Solved] How can i do this in css/html?

.outer{ width: 300px; height: 300px; position: relative; } .outer > .inner{ background: rgba(0,0,0,0.9); color: #fff; position: absolute; padding: 10px; right: 0; bottom: 0; left: 0; z-index:1; } <div class=”outer” style=”background:url(http://lorempixel.com/600/300/)center center no-repeat;background-size:cover”>&nbsp;<div class=”inner”>Some text here</div></div> 0 solved How can i do this in css/html?

[Solved] Why are images not showing on website?

You can use this code: $(function() { $(“.img-w”).each(function() { $(this).wrap(“<div class=”img-c”></div>”) let imgSrc = $(this).find(“img”).attr(“src”); $(this).css(‘background-image’, ‘url(‘ + imgSrc + ‘)’); }) $(“.img-c”).click(function() { let w = $(this).outerWidth() let h = $(this).outerHeight() let x = $(this).offset().left let y = $(this).offset().top $(“.active”).not($(this)).remove() let copy = $(this).clone(); copy.insertAfter($(this)).height(h).width(w).delay(500).addClass(“active”) $(“.active”).css(‘top’, y – 8); $(“.active”).css(‘left’, x – 8); setTimeout(function() … Read more

[Solved] Select random element and set attribute background color [closed]

When you use class instead of id then you can do something like this. Get all the hello elements Create a random Index in the range from zero to the length of your elements Set the style.color of this random Index element in your helloElements to red let helloElements = document.querySelectorAll(“.hello”); let ind = (Math.floor(Math.random() … Read more

[Solved] Bootstrap single full width column

You can use bootstrap col-12 class or just use a simple div to make it full width everywhere. Here is the working example using bootstrap col-12 class: .col-12 { background-color: #dedede; } .content { background-color: #abaaba; } <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css” integrity=”sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm” crossorigin=”anonymous”> <div class=”container-fluid”> <div class=”row”> <div class=”col-12″> <h1>Welcome back User!</h1> </div> </div> </div> <!– … Read more

[Solved] How to implement these kinds of style (in pictures below) with HTML & CSS [closed]

Even if the inner content it’s not an image, in both case you could use <figure> and <figcaption>, e.g. Codepen demo Markup <figure aria-labelledby=”figure-1-1″ class=”f1″> <figcaption id=”figure-1-1″>Title of the figure</figcaption> … </figure> <figure aria-labelledby=”figure-1-2″ class=”f2″> <figcaption id=”figure-1-2″>Title of the figure</figcaption> … </figure> CSS .f1, .f2 { border: 1px #9bc solid; position: relative; border-radius: 5px; min-height: … Read more

[Solved] Tic Tac Toe program by using Javascript [closed]

The code is not related to Tic-Tac-Toe. This is general JavaScript code. Not Specific. All this do is check whether a document.all is present and whether getElementById function is present or not. Which is true for present World. document.all list all elements and document.getElementById is a function which return the element with id that match … Read more

[Solved] how to limit paragraph display in html [closed]

You can use line-clamp. This will truncate the amount of lines shown based on the value of -webkit-line-clamp .line-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } Browser support for this is good, apart from the usual lagger IE11. Find a full guide on how to use this on CSS Tricks. Other solutions … Read more

[Solved] How to align the popup ul relatively the parent li [closed]

You will need to use some translateX and left for the dropdown ul and also set position:relative to the parent li * { margin: 0; padding: 0; } #track-nav { margin-left: 50px; margin-top: 50px; float: left; width: 100%; list-style: none; font-weight: bold; margin-bottom: 10px; } #track-nav li { position: relative; padding-bottom: 15px; float: left; margin-right: … Read more