CSS - Safari Input Focus Blue Border
heys all,
so im trying to get rid of that input:focus blue 'border' or 'outline' that happens in safari browsers. determined that if you apply a opacity: 0.99 to only the safari browsers, then it won't do that. however, this is only a fix for safari MAC. any thoughts on safari PC? thanks. Similar TutorialsAs you can see, the image that says view all clients has a blue border on top and to the left also. There are no borders set for this image so I am not sure why its there. It does not show up on safari, just firefox. (I am not sure about IE since I am on a mac). Here is the code: .view_all_projects{ width:245px; height:63px; position:absolute; overflow:hidden; margin: 550px 0 0px 0; } And here is the html: <div class="view_all_projects"><a href="http://www.bestdropshipper.net/order.html"><img src="images/more_project.gif" alt="Best Dropshipper"/></a> </div> This image is also clickable. Any ideas why the strange blue border? Hello Im trying to find a way to force :active and :focus from temporary states to permanent effects in safari ? basically make them behave just like they behave on internet explorer. As of right now, if you go to the website using safari, you will have to press and hold the mouse button in order to see the image. is there any hack ? or fix to do this ? thanks the website is http://www.danielyanez.com and the css is http://www.danielyanez.com/Stylesheet.css it works well on IE and even in firefox, but in safari you have to keep pressing the button. I have tried firefox and IE, lastest versions and all works ok, but in Safari the top left and top right of the rounded purple border is not rounded like the other radius borders on the page which show correctly. The attached image is what the left and right rounded purple border looks like, but can not figure out why it shows ok in Firefox but not Safari. Can anyone see where I might be going wrong in trying to get this to work like other browsers show it ? Code: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Home</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"><!-- body { border: 0em solid #000; background-color: #ddd; height: 100%; } div { padding: 0em; margin: 0em; } div.bodyContainer, div.header, div.footer { width: 60em; } div.header { text-align: center; } div.bodyContainer { text-align: center; margin: 0 auto; } div.left, div.right { width: 10em; border-bottom: 0.0625em dashed #CF8DEB;} div.middle { width: 40em; margin: 0 auto; padding-left: 0.41em; border-bottom: 0.0625em dashed #CF8DEB;} div.footer { text-align: center; } div.bodyContainer, div.outer, div.left, div.right { background-color: #56D1AC; /* green */ } div.bodyContainer, div.header, div.middle { border-top-left-radius: 1.125em; border-top-right-radius: 1.125em; } div.outer { display: block; } div.left, div.middle, div.right { display: table-cell; } div.middle { border-top: 0.3em solid purple; border-right: 0.6em solid purple; border-left: 0.6em solid purple; } div.bodyContainer { /*background-color: pink;*/ } div.middle { background-color: lightblue; } div.footer { background-color: #ddd; } .clearfloat { clear: both; } .menu { background: #6384DE; margin: 0em; text-align: center; font-size: 0.965em; font-family: Broadway; border: 0em solid #EDB6B6; padding: 0.5em 0em 0.313em 0em; border-top-left-radius: 1.125em; border-top-right-radius: 1.125em; } /* 3F65CC */ --></style> </head> <body onload="disableUpdateSubmit();"> <div class="bodyContainer"> <div class="header"> <!-- menu start --> <div class="menu"></div> <div class="clearfloat"></div> <!-- menu end --> </div> <div class="outer"> <div class="left"><br></div> <div class="middle"><br>middle</div> <!-- middle end --> <div class="right"> <!-- start of specials --> <div class="specials">SPECIAL OFFERS</div> <!-- end of specials --> <br class="clearfloat"> </div> </div> <div class="footer"></div> </div> </body> </html> When using Safari, whenever you click inside an input field, a highlight goes around the field (focus ring). Is there anyway to use CSS to remove the focus ring altogether? I am using the following code to create a custom input field: Code: input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus { outline: 0 none; } This essentially removes the border from the input field however this does not work in Safari on a Mac (works fine in Safari on Windows). Any one know how to fix this? Hey as the topic title says, can I put a background-image on a text input so that it shows in safari? I can't figure it out and can't find anything using google. Anyone have any experience with this? Thanks This afternoon I could finaly continue working of a menu bar. First I did use Table's but after reading a CSS guide ( E. Meyer ), I could change that with a ul/li and CSS. I have floating on the left side: / spacer / two icons / spacer / ... / set of centered links / ... / and floating on the right side / spacer / form fields / Here my CSS Code: #footer { clear: both; padding: 2px 0px 10px 0px; font: 11px arial, helvetica, sans-serif; width: 100%; overflow: auto; text-align: center; border: 1px solid; /*min-height: 23px; max-height: 32px;*/ position: absolute; bottom: 0px; left: 0px; height: 25px; } #footer li.img { padding-left: 4px; padding-right: 4px; float: left; } #footer li.spacer { min-width: 6px; float: left; } #footer li#spacerLeft { margin-left: 8px; float: left; border-left: 2px #ddd dotted; } #footer li#spacerRight { border-right: 2px #ddd dotted; margin-right: 8px; float: right; } #footer li#txtSelector { margin-right: 10px; float: right; } #footer a { clear: both; margin: 0 0 ; height: auto; } #footer ul { text-align: center; margin: 0 0 ; padding: 0; list-style-type: none; } #footer li { padding-left: 3px; padding-right: 3px; display: inline; min-height: 23px; width: auto; } #footer input { font-family: Verdana; color: #333333; font-size: 7pt; width: 80px; } This with my HTML Code: <div id="menu_container"> <div id="footer"> <ul> <!-- spacer --> <li class="spacer"> <!-- icons --> <li class="img"><img src="comment.gif"> <li class="img"><img src="feedicon.gif"> <li id="spacerLeft" class="spacer"> <!-- links --> <li class="link"><a href="/">Inline test</a> <li class="link"><a href="/">home</a> <li class="link"><a href="/">web</a> <li class="link"><a href="/">Simple more links</a> <li class="link"><a href="/">Simple, even more links</a> <!-- input search field --> <li id="txtSelector"> <form action="search.php" method="post"> <input type="text" name="search" value="Search Here" size="20" >; </form> <!-- spacer --> <li id="spacerRight" class="spacer"> </ul> </div><!-- footer --> </div><!-- footer container --> I am close, with what I want. But If I use this in Safari, it crashes when I make my window small. On FireFox the input field is not in line with the other items. If I the window is to small to show them all, I would love to have the middle li items wraps under them selfs. like: link link link link one two three four and not link one link two link three link four This did work in my table test, but not here. I did have it one time, but I think it was by accident. Does someone have any clue? Thanks I'm going round and round without getting any head way so hopefully someone can give me a hand... I'm creating a mail form using a background image for the input fields. What I don't want is a border. If I don't add a border: solid black, for instance, I get a default white. Is there a way to have no border? Code: INPUT.email { background-image: url(images/bg_email.jpg); width:206px; height:21px; font-family: Verdana, sans-serif; font-size: 14px; color: #ffffff; border: 1px solid black; margin: 0 0 0 10px; padding: 0 0 0 6px; } Thanks in advance! Hi, I am trying to make a link's text black with a blue underline. Is this possible? Here is my code, which produces black text with a black underline: Code: .link{ text-align:left; color:#000000; font-size:14.5pt; font-family:times new roman,serif; font-weight:normal; text-decoration:underline color:#09328a; } Hi All, I have created a site in pure html and one of very strange behaviour i have ever seen is blue lines just like the a href links are coming ,Please can any one help there.They come on site first time and again on refresh they got disappear and its coming on Mozilla firefox and netscape not on IE. Site name: http://tedje.com/ Thanks in advance or any suggestion. Hi. Have created some simple tabs using table cells. Active tab should have bottom-border color equal to page background-color. Non-active tabs should have bottom-border=black. Works fine in IE, but does not work very well in Firefox. If I remove the border-collapse:collapse on the table, then firefox also work... but I would like to be able to keep the 1px border between each table cell. So is there a way to make this work in both IE and Firefox... and hopefully most other browsers... See code below: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <style type="text/css"> a.menu_top:link {color: #000000; text-decoration: none;} a.menu_top:visited {color: #000000; text-decoration: none;} a.menu_top:hover {color: #000000; text-decoration: none;} a.menu_top:active {color: #000000; text-decoration: none;} td.menu_top_passive { background-color: #777; border-left: 1px #000000 solid; border-right: 1px #000000 solid; border-top: 1px #000000 solid; border-bottom: 1px #000000 solid; text-align: center; cursor:pointer; font-weight: bold; padding: 5px 20px 5px 20px; margin: 0; } td.menu_top_active { background-color: #bbb; border-left: 1px #000000 solid; border-right: 1px #000000 solid; border-top: 1px #000000 solid; border-bottom: 1px #bbb solid; text-align: center; cursor:pointer; font-weight: bold; padding: 5px 20px 5px 20px; margin: 0; } </style> <script language="JavaScript"> function change(id, url) { for (i=1; i<6; i++){ eval("document.getElementById("+i+").className='menu_top_passive'"); } eval("document.getElementById("+id+").className='menu_top_active'"); } </script> </head> <body style="margin:0; padding:0; background-color:#bbb;"> <br><br> <center> 1. Load the page.<br> 2. Click Item 4.<br> 3. Click Item 2.<br><br> Why is the bottom border of the menuelements (table cells) not getting correct in Firefox?<br> None-active menuelements should have a border-bottom = black, active should have same bottom-border as page.<br> Notice that I use border-collapse on the table in order to get the cell-border 1px thick between the menuitems.<br> If I remove border-collapse, then there is no strange behaviour in Firefox.<br> Any way to get this working in Firefox without breaking it in IE? </center> <br><br><br> <table border="0" cellpadding="0" cellspacing="0" align="center" style="border-collapse:collapse;"> <tr> <td id="1" nowrap class="menu_top_active" onClick="change('1');"><a href="javascript:;" class="menu_top">Item 1</a></td> <td id="2" nowrap class="menu_top_passive" onClick="change('2');"><a href="javascript:;" class="menu_top">Item 2</a></td> <td id="3" nowrap class="menu_top_passive" onClick="change('3');"><a href="javascript:;" class="menu_top">Item 3</a></td> <td id="4" nowrap class="menu_top_passive" onClick="change('4');"><a href="javascript:;" class="menu_top">Item 4</a></td> <td id="5" nowrap class="menu_top_passive" onClick="change('5');"><a href="javascript:;" class="menu_top">Item 5</a></td> </tr> </table> </body> </html> I'm a little puzzled by this weird display bug by IE7, this bug doesn't occur in IE6. It had to do with the DIV's CSS's border-style. If you set it to double then you notice some random bugs with it. Some of the time, the border is displayed without a problem. Some of the time, it is displayed with some gaps in the line as if it is not being drawn upon. Some of the other time, it is not displayed at all. I noticed if I switch from one tab to another then back, the border appeared as if nothing had happened. I also noticed that if I open the view source that overlapp the web browser then closed it, the border appeared as if nothing had happened. How do you fix that problem? Thanks... Hi, This used to be my solution: Code: <table border=1 bordercolorlight='#CCCCCC' Bordercolordark='#FFFFFF'> But this only works well on IE - not Mozilla Now I want to use CSS: Code: .results { border: 1px solid #CCCCCC ; } Code: <table class='results'> --------------- The problem is, with CSS, only the TABLE acquires the border property. The cells within it don't. If I specify Code: <td class='results'> for all the cells in the table, this also won't work, because the cell borders overlap each other and some border lines seem thicker than others (because of overlapping). Is there any simple way I can specify the border property for the table - in ONE declaration? I want the table and td borders all to be a simple 1px width ...is that possible in one declaration? Thanks a lot! I would like to set up a table with a different border than the cells inside it. Here's my code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> TABLE {border: 1px solid black; border-collapse: collapse; width: 200px} TD {border: 1px solid #ccc} </style> </head> <body> <table> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> </body> </html> That's all hunky dory in (gasp!) IE, but good browsers...they only show the lighter gray color. How do I get the table border to be different? Hi there, I've been battling to get this right...basically I have the following HTML setup: <input class="tboxes" type="textbox" /> <input class="tboxes2" type="textbox" /> "span.label01" is an inline element, and appears to the left of the textbox "input.tboxes". What I am trying to do attach some style to "span.label01" AND "div.box10" when the textbox receives focus. I have tried the following CSS code: input.tboxes:focus { color:#FF9900; } input.tboxes2:focus { color:#FF9900; } but nothing happens. I know this is a CSS selector issue, but I just can't seem to get it right. I have even tried adjacent sibling selectors, and nothing. Can anyone help me here? TIA! Hi, I've created a DIV ( that contains an iframe ) over a flash movie ( it could be an image also ). The problem is that if I click outside the iframe/DIV it disappears completely. Is there a way around this? Just one more question: what version of Netscape deals with iframes? Kind regards, Kepler Hi, in firefox I can do this to highlight a form element when it is selected. input[type="text"]:focus, input[type="password"]:focus, input[type~="text"]:focus, input[type~="password"]:focus, select:focus, textarea:focus { border: 1px solid #9ED175; } Is there a way I can do this in IE ? thanks scott you know that little black dotted inobtrusive focus ring that appears on links when you click them in firefox. I can make a case for shutting it down temporarily on this one link I have. I've found out ways to edit your profile and fix it. but obviously I cant go edit every visitor to my website's firefox/mozilla profile. In general I think it is a nice feature. But what css can I put on this one thing so it wont do it? OK... I went back to the original source. and it did not suffer from this problem So I went back and tweaked my css correspondingly . Now the focus ring goes where its supposed to. Good thing cuz I never heard of anybody changing it except for themself. Hi, I have a file named button.html with this code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <style> input:focus { border: 1px solid navy; } </style> </head> <body> <input type = "text" /> </html> When I store it in my desktop, and open it from there, the focus works as expected. But when I store the file in Wamp and open it there either by typing C:\Wamp\www\button.html or http://localost/button.html in the URL bar, nothing happens. Can anybody explain this and offer a remedy? Here's the problem: aparently Opera places an inverse color highlight on links that receive the keyboard focus (see Javascript Development: How do I hide focus on Opera?), and I'd like to hide it. CSS3 property
Code: outline-style is useless here, and I've also tried setting the JScript Code: hideFocus property, but aparently this only works on IE. In fact, I've tried everything I can think of except blurring the link, which would completely defeat my purpose. I tried Javascript Development and got nothing, so maybe the answer is not Javascript. Is there possibly some proprietary CSS extension in Opera that would hide the highlight? If so, what is it and how do I use it? |