How to remove sharp edges in text-stroke css? - css

I have this code
-webkit-text-stroke: 30px #67676726;
text-shadow: 0px 4px 20px #d5d5d5,
0px 3px 0px #777777,
0px 5px 0px #777777,
0px 5px 0px #777777,
0px 0px 15px #777777,
0px 0px 15px #777777,
0px 6px 0px #777777,
0px 7px 0px #777777,
0px 8px 0px #777777,
0px 5px 0px #777777,
0px 5px 0px #777777;
this is like a glass effect at the back of text. what I need is I want to remove the sharp edges
it's when I increase the width of text-stroke
It is much appreciated for those who can help me.
PURE CSS only

You could try to wrap your text inside a div tag, add width and height and set the overflow to hidden so your edges get cut off.
Here an example:
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.text {
margin: 40px;
width: 160px;
height: 39px;
position: relative;
overflow: hidden;
}
h1 {
z-index: 999;
width: 100%;
height: 100%;
text-align: center;
position: absolute;
-webkit-text-stroke: 20px #0e000026;
text-shadow: 0px 4px 20px #d5d5d5,
0px 3px 0px #777777,
0px 5px 0px #777777,
0px 5px 0px #777777,
0px 0px 15px #777777,
0px 0px 15px #777777,
0px 6px 0px #777777,
0px 7px 0px #777777,
0px 8px 0px #777777,
0px 5px 0px #777777,
0px 5px 0px #777777;
}
<div class="text">
<h1>LetterNVZ</h1>
</div>

Related

How to add the same border-radius to element and box-shadows of element

I have an element on which i add two box-shadows and I want the corners of the element AND the box shadows to have the same border-radius. Somehow it's not happening.
The element appears with a different border-radius than the first box-shadow, and the first box-shadow appears with a different border radius than the second box-shadow.
Here's the code:
.stack_item{
overflow: hidden;
border-radius: 10px 10px 10px 10px;
-moz-border-radius: 10px 10px 10px 10px;
-webkit-border-radius: 10px 10px 10px 10px;
transform: translate(-50%, 9%);
-webkit-box-shadow: 0px -15px 0px -7px rgb(206, 204, 204), 0px -29px 0px -13px rgb(168, 168, 168);
-moz-box-shadow: 0px -15px 0px -7px rgb(206, 204, 204), 0px -29px 0px -13px rgb(168, 168, 168);
box-shadow: 0px -15px 0px -7px rgb(206, 204, 204), 0px -29px 0px -13px rgb(168, 168, 168);
}
Since you are making your shadow shrink, the border-radius is also shrinking.
Set it on a larger pseudo-element and it will be ok
.stack_item{
width: 200px;
height: 100px;
position: relative;
border: solid 1px black;
border-radius: 10px 10px 10px 10px;
margin-top: 50px;
background-color: white;
}
.stack_item:before,
.stack_item:after {
content: "";
position: absolute;
top: 0px;
bottom: 50px;
border-radius: inherit;
}
.stack_item:before {
left: 7px;
right: 7px;
box-shadow: 0px -8px 0px 0px rgb(206, 204, 204);
z-index: -1;
}
.stack_item:after {
left: 13px;
right: 13px;
box-shadow: 0px -16px 0px 0px rgb(168, 168, 168);
z-index: -2;
}
<div class="stack_item"></div>

inset box shadow not working in my case?

div{
height:100px;
width:100px;
background:pink;
box-shadow: 0px 0px 0px 3px #000;
}
Above css worked but when I do box-shadow: inset 0px 0px 0px 3px #000; is wasn't work, I also tried box-shadow: 0px 0px 0px 3px #000 inset. Any idea?
try it with smaller number of parameters:
box-shadow: inset 0px 0px 3px #000;
or with specified engine:
-moz-box-shadow: inset 0px 0px 10px #000000;
-webkit-box-shadow: inset 0px 0px 10px #000000;
box-shadow: inset 0px 0px 10px #000000;
The syntax of box-shadow property is as follows:
box-shadow: none|h-shadow v-shadow blur spread color |inset|initial|inherit;
You are not setting any value to h-shadow and v-shadow. That is why you are not able to see a shadow.
Try this code
div {
box-shadow: 10px 10px 5px #888888;
height: 100px;
width: 100px;
}
<div>
</div>

CSS margin won't work in stylesheet but in code

I have a style that works fine in "code":
<img class="minbild" style="margin-right: 22px; float: left;" src="/images/Etiketter/AmarilloSingleHopEtikett.jpg" alt="AmarilloSingleHopEtikett" width="300" height="300" />
This will set the margin-right to 22 px. When I move it to the "minbild" class it stops working...
.minbild {
margin-right:62px;
box-shadow: 0px 0px 0px 1px #555, 0px 0px 0px 10px #eee, 0px 0px 0px 11px #555, 3px 3px 5px 11px #555;
-moz-box-shadow: 0px 0px 0px 1px #555, 0px 0px 0px 10px #eee, 0px 0px 0px 11px #555, 3px 3px 5px 11px #555;
-webkit-box-shadow: 0px 0px 0px 1px #555, 0px 0px 0px 10px #eee, 0px 0px 0px 11px #555, 3px 3px 5px 11px #555;
}
Anyone have any idea why this is happening? I use the same css-file for my jceditor and it shows the margin fine! I have tried Chrome and IE9.
Remove the inline css, it should fix the problem:
<img class="minbild" src="/images/Etiketter/AmarilloSingleHopEtikett.jpg" alt="AmarilloSingleHopEtikett" width="300" height="300" />
Inline CSS was taking priority over external css.

Two Divs, Same CSS, Same Line

I would like to use the same CSS for two boxes and keep'em in the same line with a little space between . I am not very familiar with css.
This is my code :
div.box {
width: 50%;
display: inline-block;
background-color: #eeeeee;
padding: 10px 0px 10px 0œpx;
margin :20px 0px 20px 0px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
-webkit-box-shadow: 0px 19px 10px 0px rgba(0,0,0,0.82);
-moz-box-shadow: 0px 19px 10px 0px rgba(0,0,0,0.82);
box-shadow: 0px 19px 10px 0px rgba(0,0,0,0.82);
}
Changing width to 48 or 47% can be a solution, but I don't think it's the good way .
use this:
div.box {
width: 49%;
display: block;
float:left;
min-height:100px;
background-color: #eeeeee;
padding: 10px 0px 10px 0œpx;
margin :20px 0px 20px 0px;
margin-left:2%;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
-webkit-box-shadow: 0px 19px 10px 0px rgba(0,0,0,0.82);
-moz-box-shadow: 0px 19px 10px 0px rgba(0,0,0,0.82);
box-shadow: 0px 19px 10px 0px rgba(0,0,0,0.82);
}
div.box:first-child{
margin-left:0;
}
DEMO

How to change asp:DropDownList extended background color ? CSS class

Here the class and the example
<asp:DropDownList ID="dropDownListZenithYesNo"
CssClass="dropDownBox" runat="server"></asp:DropDownList>
And here the CSS class of that dropdownlist
.dropDownBox
{
font-size: 13px;
color: #3b3b3b;
padding: 5px;
background: -moz-linear-gradient(
top,
#f0f0f0 0%,
#d6d6d6);
background: -webkit-gradient(
linear, left top, left bottom,
from(#f0f0f0),
to(#d6d6d6));
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
border: 1px solid #999999;
-moz-box-shadow: 0px 1px 2px rgba(000,000,000,0.5), inset 0px 1px 0px rgba(255,255,255,1);
-webkit-box-shadow: 0px 1px 2px rgba(000,000,000,0.5), inset 0px 1px 0px rgba(255,255,255,1);
box-shadow: 0px 1px 2px rgba(000,000,000,0.5), inset 0px 1px 0px rgba(255,255,255,1);
text-shadow: 0px 1px 0px rgba(255,255,255,1), 0px 1px 0px rgba(255,255,255,0);
}
And here how it looks nice when you not click to see elements
And this is how very bad it looks when you click to see elements
Testing with windows 7 firefox latest version
CSS CSS3 HTML dropdown list color style
Add the following css below your css
.dropDownBox option
{
font-size: 13px;
color: #3b3b3b;
padding: 5px;
background: -moz-linear-gradient(
top,
#f0f0f0 0%,
#d6d6d6);
background: -webkit-gradient(
linear, left top, left bottom,
from(#f0f0f0),
to(#d6d6d6));
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
border: 1px solid #999999;
-moz-box-shadow: 0px 1px 2px rgba(000,000,000,0.5), inset 0px 1px 0px rgba(255,255,255,1);
-webkit-box-shadow: 0px 1px 2px rgba(000,000,000,0.5), inset 0px 1px 0px rgba(255,255,255,1);
box-shadow: 0px 1px 2px rgba(000,000,000,0.5), inset 0px 1px 0px rgba(255,255,255,1);
text-shadow: 0px 1px 0px rgba(255,255,255,1), 0px 1px 0px rgba(255,255,255,0);
}
But test your page in multiple browsers because it may have different results. Infact i have different results.
You must be inheriting from a default style. I would suggest specifying the color for your options:
.dropDownBox option{
font-size:1.2em;
background-color:#FF0 !important;
display:block;
}
Here is the fiddle

Resources