How to give shadow to a border
Tags: css
Problem :
How to give shadow to a border?
css codes:
p{
border-right:2px solid black;
line-height:4em
}
Now is it possible to give shadow to this border?
Solution :
Depends on what type of shadow do you want to achieve
Dynamically generate the border and add the shadow
p {
line-height:4em;
position: relative;
}
p::after {
content: ' ';
width: 2px;
height: 4em;
background-color: black;
display: block;
position: absolute;
top: 0;
right: 0;
box-shadow: 3px 3px 2px red;
}
<p>Stack Overflow</p>
Simple offset shadow to the right
p {
border-right:2px solid black;
line-height:4em;
box-shadow: 2px 0px red;
}
<p>Stack overflow</p>
CSS Howto..
It is with CSS3. There's even a handy gradient generator which takes the guesswork out of it. Of course, this is completely unsupported in IE8 and under. Edit For the...
I suspect that you are missing a reset on the ul/li to remove the default margin/padding. div.partlist { -moz-column-count: 3; -moz-column-gap: 10px; -webkit-column-count: 3; -webkit-column-gap: 10px; column-count: 3; column-gap: 10px;...
Try to use display:flex; add this to add this, ul {display:flex;justify-content: space-around;list-style-type: none;} ul.nav li { flex:1; text-align: center; } /* Edit from comment by Paulie_D Working DEMO...
Put this line of code in your <head> (above the rest of your JavaScript) <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> Or if the code is not compatible with 2.1.3, you can use this one...
As far as I understand from your question you need <p> below your logo so clear your float after the logo div My Fiddle <div style="clear: both;"></div> <div class='tagline'> <p>Fast...
Based on your image, you can realize the layout by using the the following HTML: <div class="contentpart"> <a href="#"> <img src="http://placehold.it/300x200"> </a> Donec adipiscing, lorem non euismod venenatis... </div> and...
I'd say first, I would use the .click() property in stead of .on(). To my understanding, you have to start .on() with $(document) also, in stead of the thing to...
I figured out how they did it and put the answer in the original post after the "Edit:" mark.
If you want to use CSS tables, I would suggest: .post { display: table; } .post p { display: table-cell; vertical-align: middle; height: inherit; /* may not be needed */...
Pure CSS2 Option Utilize pseudo-elements. Add position: relative; to the .current_page_item (or li if you plan on using this for the hover). Then... New Answer (resolves IE bug) Adding the...
Set the hide2 class initially to the element or execute the toggle statement once. #foo td { padding: 1em; border: 1px solid black; } #foo.hide2 tr > td:nth-child(2) { display:...
On my new practice page i`ve created several things like this (to change div height according to the viewport height) Why use a jQuery or Javascript for this??? You...
You could use the @media command to have a custom style for specific screen sizes @media screen and (max-width:480px){Your css here} ...
I think that your main problem was that you were only fading to 50% opacity, I have changed this to 0% opacity now. In addition I have added a couple...
To left align the link and the dropdown on the mobile viewport, add this to your CSS. @media (max-width: 767px) { .navbar .nav.custom > li > a:hover, .navbar .nav.custom >...
if the parameter name in your action (search in this case) is not defined in your route config, it'll be appended as a query string parameter when doing GET requests....
It's the width/height attributes on your images that are causing the problem. You have the width and height set to "auto". Either set an explicit width/height: <img src="zanza/zanza_portrait_top.png" width="179" height="198"...
add this css: #sb-caption:empty {display:none;} ...
.pull-left { float: left; } p { clear: both; } You may want to make this a little more specific using classes or id's for the <p> tag, however....
Kindly try your best before asking these questions! However your ans is below! Demo $(window).resize(function(){ if(window.innerWidth < 768) { var $detCenter = $(".tm_center").detach(); $(".tm_left").before($detCenter); } }); ...
You can write this in your external stylesheet: .printSpan { color: red; } This is called the class selector. By the way, your code should be: { innerHTML : _text,...
Try clearing your floats and see if that helps. Also, make sure your page validates.
They use an image + css sliding door method: http://static01.linkedin.com/scds/common/u/img/bg/bg_sharepostmod_567x400.png You can achieve the same thing without an image by using CSS3 for the rounded corner and background gradient, plus...
You could try any of the following, Vanilla window.onresize = function(event) { /** Your code here. **/ }; jQuery $(window).resize(function() { /** Your code here. **/ }); or A CSS...
You can just use parseInt(); to parse the border width from Npx to N: var width = $elem.css('borderWidth'); // 150px var parsed = parseInt(width); // 150 I had a Google...
Test for the computed style of the transition property. If it matches the property you are changing, wait for the transitionEnd event. if(window.getComputedStyle(element).transitionProperty.match(/\bheight\b/)) { //handle transitionEnd event } else {...
I assume that all your files are on a local hard drive encoded in UTF-8. dummy.html <link rel="stylesheet" href="smartdoc.css" /> smartdoc.css a { background-color: red; } p { background-color: green;...
You probably don't want to do this. Much CSS won't work in email, and so your regular CSS isn't useful in that context. As an example, in a number of...
You have 2 problems: 1) You can not do :not(div.myList). You can only do :not(.myList). this is the correct syntax: .container :not(.myList) input[type="text"] { border:2px solid #f00; } This is...
What you want to do is not possible with the default Bootstrap grid system. Each .col-*-* will take only the height it needs, since it is floated. If possible, I...