Cross browser CSS rules [duplicate]2019 Community Moderator ElectionHow to detect Safari, Chrome, IE, Firefox and Opera browser?How to align checkboxes and their labels consistently cross-browsersSet cellpadding and cellspacing in CSS?How to vertically center a div for all browsers?Is there a CSS parent selector?How to make a div 100% height of the browser window?Change an HTML5 input's placeholder color with CSSGet the size of the screen, current web page and browser windowHow can I transition height: 0; to height: auto; using CSS?How do CSS triangles work?Is it possible to apply CSS to half of a character?
Why do we call complex numbers “numbers” but we don’t consider 2-vectors numbers?
School performs periodic password audits. Is my password compromised?
Insult for someone who "doesn't know anything"
Why isn't P and P/poly trivially the same?
Did Amazon pay $0 in taxes last year?
Sort array by month and year
What can I do if someone tampers with my SSH public key?
How to educate team mate to take screenshots for bugs with out unwanted stuff
Professor forcing me to attend a conference, I can't afford even with 50% funding
Tool for measuring readability of English text
PTIJ: Sport in the Torah
A running toilet that stops itself
Why does a car's steering wheel get lighter with increasing speed
Short story about cities being connected by a conveyor belt
Why do we say 'Pairwise Disjoint', rather than 'Disjoint'?
Having the player face themselves after the mid-game
How does a sound wave propagate?
Rationale to prefer local variables over instance variables?
Who has more? Ireland or Iceland?
Is "cogitate" used appropriately in "I cogitate that success relies on hard work"?
What is the orbit and expected lifetime of Crew Dragon trunk?
Does the US political system, in principle, allow for a no-party system?
Should I file my taxes? No income, unemployed, but paid 2k in student loan interest
What does *dead* mean in *What do you mean, dead?*?
Cross browser CSS rules [duplicate]
2019 Community Moderator ElectionHow to detect Safari, Chrome, IE, Firefox and Opera browser?How to align checkboxes and their labels consistently cross-browsersSet cellpadding and cellspacing in CSS?How to vertically center a div for all browsers?Is there a CSS parent selector?How to make a div 100% height of the browser window?Change an HTML5 input's placeholder color with CSSGet the size of the screen, current web page and browser windowHow can I transition height: 0; to height: auto; using CSS?How do CSS triangles work?Is it possible to apply CSS to half of a character?
This question already has an answer here:
How to detect Safari, Chrome, IE, Firefox and Opera browser?
19 answers
Using one style sheet I want to achieve kind of cross platform rules.
I will show you quite easy example to explain exactly what I want.
I have two div elements like that:
<div class="outer">
<div class="inner">
</div>
</div>
And some simple styles to them:
div.outer
background-color: red;
width: 200px;
height: 200px;
div.inner
height: 100px;
width: 100px;
background-color: blue;
Now I want to override background color of one of them, for example inner, with the other color based on the browser I'm using. For example if I open this by Chrome I want this color to be green, and when I open it with IE I want it to be blue.
I have an idea how to do this (instead of other style sheets for each browser), but it doesn't work this way:
@media screen
.chrome .inner
background-color: green !important;
Do you know how to do that guys?
css html5 css3 cross-browser
marked as duplicate by Alohci
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
2 days ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to detect Safari, Chrome, IE, Firefox and Opera browser?
19 answers
Using one style sheet I want to achieve kind of cross platform rules.
I will show you quite easy example to explain exactly what I want.
I have two div elements like that:
<div class="outer">
<div class="inner">
</div>
</div>
And some simple styles to them:
div.outer
background-color: red;
width: 200px;
height: 200px;
div.inner
height: 100px;
width: 100px;
background-color: blue;
Now I want to override background color of one of them, for example inner, with the other color based on the browser I'm using. For example if I open this by Chrome I want this color to be green, and when I open it with IE I want it to be blue.
I have an idea how to do this (instead of other style sheets for each browser), but it doesn't work this way:
@media screen
.chrome .inner
background-color: green !important;
Do you know how to do that guys?
css html5 css3 cross-browser
marked as duplicate by Alohci
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
2 days ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to detect Safari, Chrome, IE, Firefox and Opera browser?
19 answers
Using one style sheet I want to achieve kind of cross platform rules.
I will show you quite easy example to explain exactly what I want.
I have two div elements like that:
<div class="outer">
<div class="inner">
</div>
</div>
And some simple styles to them:
div.outer
background-color: red;
width: 200px;
height: 200px;
div.inner
height: 100px;
width: 100px;
background-color: blue;
Now I want to override background color of one of them, for example inner, with the other color based on the browser I'm using. For example if I open this by Chrome I want this color to be green, and when I open it with IE I want it to be blue.
I have an idea how to do this (instead of other style sheets for each browser), but it doesn't work this way:
@media screen
.chrome .inner
background-color: green !important;
Do you know how to do that guys?
css html5 css3 cross-browser
This question already has an answer here:
How to detect Safari, Chrome, IE, Firefox and Opera browser?
19 answers
Using one style sheet I want to achieve kind of cross platform rules.
I will show you quite easy example to explain exactly what I want.
I have two div elements like that:
<div class="outer">
<div class="inner">
</div>
</div>
And some simple styles to them:
div.outer
background-color: red;
width: 200px;
height: 200px;
div.inner
height: 100px;
width: 100px;
background-color: blue;
Now I want to override background color of one of them, for example inner, with the other color based on the browser I'm using. For example if I open this by Chrome I want this color to be green, and when I open it with IE I want it to be blue.
I have an idea how to do this (instead of other style sheets for each browser), but it doesn't work this way:
@media screen
.chrome .inner
background-color: green !important;
Do you know how to do that guys?
This question already has an answer here:
How to detect Safari, Chrome, IE, Firefox and Opera browser?
19 answers
css html5 css3 cross-browser
css html5 css3 cross-browser
asked 2 days ago
MystaxMystax
53
53
marked as duplicate by Alohci
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
2 days ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Alohci
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
2 days ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
check this
it will give you complete cross browser identification
when you get browser info then just custom you style
Hope it will help you Happy coding!
It's brilliant in its simplicity, thanks a lot.
– Mystax
2 days ago
add a comment |
There are ways to achieve certain effects like this only with CSS & HTML, but this will only target some of the major browsers.. I wouldn't recommend it.
Here's an example:
/* style for all browsers (think Google & Safari/Webkit): */
p
background-color: blue;
/* overrule for Firefox: */
@-moz-document url-prefix()
p
background-color: gold;
And then in your HTML for IE:
<!--[if IE]>
<style>
p
background-color: purple;
</style>
<![endif]-->
1
Unfortunately I can mark only one answer as a solution and Rai was better for me, but thank you for help.
– Mystax
2 days ago
That's alright! I hope it helps others in the future looking for pure CSS solutions.
– Sven
2 days ago
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
check this
it will give you complete cross browser identification
when you get browser info then just custom you style
Hope it will help you Happy coding!
It's brilliant in its simplicity, thanks a lot.
– Mystax
2 days ago
add a comment |
check this
it will give you complete cross browser identification
when you get browser info then just custom you style
Hope it will help you Happy coding!
It's brilliant in its simplicity, thanks a lot.
– Mystax
2 days ago
add a comment |
check this
it will give you complete cross browser identification
when you get browser info then just custom you style
Hope it will help you Happy coding!
check this
it will give you complete cross browser identification
when you get browser info then just custom you style
Hope it will help you Happy coding!
answered 2 days ago
Rai Talha RehmanRai Talha Rehman
5011
5011
It's brilliant in its simplicity, thanks a lot.
– Mystax
2 days ago
add a comment |
It's brilliant in its simplicity, thanks a lot.
– Mystax
2 days ago
It's brilliant in its simplicity, thanks a lot.
– Mystax
2 days ago
It's brilliant in its simplicity, thanks a lot.
– Mystax
2 days ago
add a comment |
There are ways to achieve certain effects like this only with CSS & HTML, but this will only target some of the major browsers.. I wouldn't recommend it.
Here's an example:
/* style for all browsers (think Google & Safari/Webkit): */
p
background-color: blue;
/* overrule for Firefox: */
@-moz-document url-prefix()
p
background-color: gold;
And then in your HTML for IE:
<!--[if IE]>
<style>
p
background-color: purple;
</style>
<![endif]-->
1
Unfortunately I can mark only one answer as a solution and Rai was better for me, but thank you for help.
– Mystax
2 days ago
That's alright! I hope it helps others in the future looking for pure CSS solutions.
– Sven
2 days ago
add a comment |
There are ways to achieve certain effects like this only with CSS & HTML, but this will only target some of the major browsers.. I wouldn't recommend it.
Here's an example:
/* style for all browsers (think Google & Safari/Webkit): */
p
background-color: blue;
/* overrule for Firefox: */
@-moz-document url-prefix()
p
background-color: gold;
And then in your HTML for IE:
<!--[if IE]>
<style>
p
background-color: purple;
</style>
<![endif]-->
1
Unfortunately I can mark only one answer as a solution and Rai was better for me, but thank you for help.
– Mystax
2 days ago
That's alright! I hope it helps others in the future looking for pure CSS solutions.
– Sven
2 days ago
add a comment |
There are ways to achieve certain effects like this only with CSS & HTML, but this will only target some of the major browsers.. I wouldn't recommend it.
Here's an example:
/* style for all browsers (think Google & Safari/Webkit): */
p
background-color: blue;
/* overrule for Firefox: */
@-moz-document url-prefix()
p
background-color: gold;
And then in your HTML for IE:
<!--[if IE]>
<style>
p
background-color: purple;
</style>
<![endif]-->
There are ways to achieve certain effects like this only with CSS & HTML, but this will only target some of the major browsers.. I wouldn't recommend it.
Here's an example:
/* style for all browsers (think Google & Safari/Webkit): */
p
background-color: blue;
/* overrule for Firefox: */
@-moz-document url-prefix()
p
background-color: gold;
And then in your HTML for IE:
<!--[if IE]>
<style>
p
background-color: purple;
</style>
<![endif]-->
edited 2 days ago
answered 2 days ago
SvenSven
407514
407514
1
Unfortunately I can mark only one answer as a solution and Rai was better for me, but thank you for help.
– Mystax
2 days ago
That's alright! I hope it helps others in the future looking for pure CSS solutions.
– Sven
2 days ago
add a comment |
1
Unfortunately I can mark only one answer as a solution and Rai was better for me, but thank you for help.
– Mystax
2 days ago
That's alright! I hope it helps others in the future looking for pure CSS solutions.
– Sven
2 days ago
1
1
Unfortunately I can mark only one answer as a solution and Rai was better for me, but thank you for help.
– Mystax
2 days ago
Unfortunately I can mark only one answer as a solution and Rai was better for me, but thank you for help.
– Mystax
2 days ago
That's alright! I hope it helps others in the future looking for pure CSS solutions.
– Sven
2 days ago
That's alright! I hope it helps others in the future looking for pure CSS solutions.
– Sven
2 days ago
add a comment |