The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Is their any hack for css, that will only target safari browser.

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #35183

    Hi Everyone,

    I was facing a problem while adjusting the textfield width. The problem was with the safari and chromium browser. The textfield width in safari it is decreasing and in chrome browser it is increasing. Actually i try to use various hack for chromium browser css, but it was still effecting in safari browser. Can any body post unique hack for css that will either work for safari or for chromium but not for both. Is their any way that to apply css for only safari browser.

    Following are the hack that i have applied for chromium browser, but it won’t work!

    1) @media screen and (-webkit-min-device-pixel-ratio:0) {
    #career_ph_phone_no { width: 75px; }


    2) body:nth-of-type(1) #contact_ph_phone_no{
    width: 75px;

    3) #career_ph_phone_no{
    width: 75px;

    4) #career_ph_phone_no{;#
    width: 75px;


    The media query hack might not work in Safari 5 so you could give the ::root hack a try:

    ::root #career_ph_phone_no { width: 75px; }

    Hi SgtLegend, thanks for your replay.

    1) I try with ::root #career_ph_phone_no { width: 75px; }

    The above css hack was getting applied only for chromium browser ,
    but the width was not getting change. I tried with 50px, 75px and 100px.
    It was remaining fix.

    Then i try with :root #career_ph_phone_no { width: 75px; }
    Then the width for textfield was getting change, but again it was changing in firefox, safari and chromium browser also. The above css hack was getting applied for firefox, safari and chromium browser.

    I want to make changes in either safari or chromium browser, but not in both or any other browser. I am trying to search a unique css hack that will only apply for either safari or chromium, but not for bot.

    2) My friend has one more query, if you know the solution for the below problem please answer it.

    Table header fix in cross browser. He tried with tbody fix with overflow auto. But it is not working in any IE’S version.

    He refered this link

    but it was not working in any IE’s version.
    Rest all browser it was working.
    He is searching for a solution that will work in all browser.


    If you post a link maybe we can help resolve your issue another way and see what you are talking about.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.