How to set different fonts for input placeholder and value? [duplicate] - html

This question already has answers here:
Change a HTML5 input's placeholder color with CSS
(43 answers)
Closed 9 years ago.
Is the any way to set different fonts for an input placeholder and value? I need to set diffrent fonts for my input placeholder and value because they use diffrent languages. The placeholder uses an right tonleft language but the vakue uses english. Is it possible in CSS3?

You can do this by targeting the placeholder text in css. Then setting color on the input to be something else
::-webkit-input-placeholder {
color: red;
}
:-moz-placeholder {
color: red;
}
::-moz-placeholder {
color: red;
}
:-ms-input-placeholder {
color: red;
}
JSFIDDLE

Related

Html and css remove hyperlink [duplicate]

This question already has answers here:
Remove blue underline from link
(22 answers)
Closed 1 year ago.
How can i get rid of the underline and the different color because i do not want it to show the hyper link
[1]: https://i.stack.imgur.com/SfcDC.png
You can use the following code.
Put this code in CSS file
a {
text-decoration: none;
color: red;
}
a:hover{
color: black; /* You can use etc. color when user hover on link its change color of text */
}
Click here
You can use the following code to remove the underline from the hyper link.
Use this code in .css file
a:link {
text-decoration: none;
}
or you can use inline css:
Click here

Text Strike Line Color Styling [duplicate]

This question already has answers here:
CSS strikethrough different color from text?
(15 answers)
Closed 2 years ago.
How can I change the color of the the strike-through line?
If I give the strike tag a class and then use CSS to change the color, it also changes the text color. I just want to change the color of the line and not the text.
h1 {
color: #4287f5;
}
.strike {
color: #eb1515;
}
<h1><s class="strike">£1000</s></h1>
You can use text-decoration-color, although browser support is spotty
s {
color: #4287f5;
text-decoration-color: #eb1515;
}
<s>Text</s>

How do you change an element's name attribute's CSS [duplicate]

This question already has answers here:
How to change the style of the title attribute inside an anchor tag?
(10 answers)
Closed 6 years ago.
I'm trying to change the pop-up of an element using CSS, yet it doesn't work.
name {
background-color: #00BBFF;
color: white;
}
<button title="name">Test</button>
Looks like you want to use the attribute selector https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors
button[title="name"] {
background-color: #00BBFF;
color: white;
}
<button title="name">Test</button>
Unfortunately, the tooltip style cannot be changed in any browser.
I'd suggest you implementing your own with CSS (add a hidden span or some other element with the tooltip and show it on button:hover) or JS (nicer as you could set a delay before is shown).

How to add bold text with CSS? [duplicate]

This question already has answers here:
How to make my font bold using css?
(10 answers)
Closed 8 years ago.
Answers to this question show how to prepend/append text to a HTML element contents using CSS. Is there a way to make the CSS-added text bold without making the original HTML element contents bold as well?
Sure:
.OwnerJoe:before {
content: "Joe's Task:";
font-weight: bold;
}
Try:
#foo:after
{
content: 'hello!';
font-weight: bold;
}
Fiddle
Try this:
<div class="test">stuff</div>
.test{
border:1px solid #000;
}
CSS:
.test:before {
content: "more stuff";
background:red;
font-weight:bold;
}
Fiddle
All the information was in the link you posted, by the way. You just needed to add the font-weight to the right area.
That is of course possible
Just set appropriate styles to your pseudo element.
<span>World</span>
And the CSS:
span:before {
content: "Hello";
font-weight: bold;
}
Here's a working JSFiddle.

Can I define a rollover CSS style in-line? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to write a:hover in inline CSS?
Is it possible to do this:
link
a{ color: red; }
a:hover{ color: blue; }
As inline?
link
No. style="" allows to define only list of style properties. No CSS selectors are allowed there.