I have images linked to text in my site. The text appears like a link and when hovered over an image appears in a fixed position on the screen with text underneath it to describe it. I want the text under the image to appear plain and with no underline. It does in IE9, Chrome and Firefox, but not in Safari. The html for the text link looks like this:-
<p><a class="thumbnail" href="#thumb">Basil Thomas Stirratt<span><img src="images/basil stirrat.jpg" width="200" height="299" alt="" /><br />Basil Thomas Stirratt<br />taken June 1940</span></a>, who was 18 at the time, had been......</p>
The css looks like this:-
.thumbnail{
background-color:#FFFF00;
position:static;
z-index: 0}
.thumbnail:hover{
background-color:#CCCCCC;
z-index: 50}
.thumbnail span{ /*CSS for enlarged image*/
position:fixed;
background-color:#99CCFF;
padding:5px;
left: -1000px;
border: 10px ridge #E0E0E0;
visibility: hidden;
text-decoration:none;
text-indent:0px;
font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;
color:#000000;
text-align:center;
-moz-box-shadow: 3px 3px 8px #333333;
-webkit-box-shadow: 3px 3px 8px #333333;
box-shadow: 3px 3px 8px #333333;}
.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;}
Strangely I do not seem to be allowed to post images to demonstrate the problem. To see how these images appear check out my website at [1]: http://www.wellingtont2905.co.uk/story.html, look for yellow highlighted text and hover your cursor over it.
Any suggestions for how I stop Safari doing this?
Have sorted the problem. It has to do with having normal links underlined in my text, which I want. The solution has been to make the links a darkish blue, the background to my pop-up image the same blue and then change the colour of the text under the images to white. This means the text is still underlined, but in the same colour as the background and so you cannot see the underline! It works for me!!
Related
I'm using IE10 to design something at the moment [Because it needs to be completely compatible with it], and I'm having trouble.
I have two boxes on either side of the page, with an image at the top. The inner top corner is curved using border-top-*-radius, and this is also implemented on the image inside.
CSS:
#rightsidebar {
position:fixed;
width: 300px;
height: 400px;
padding: 10px;
margin: 0px 0 0 500px;
border-top-left-radius: 110px;
-webkit-border-top-left-radius: 110px;
background-color: #ffffff;
border: 2px dashed #000000;
}
#leftsidebar {
position:fixed;
width: 300px;
height: 400px;
padding: 10px;
margin: 0px 0 0 0px;
border-top-right-radius: 110px;
-webkit-border-top-right-radius: 110px;
background-color: #ffffff;
border: 2px dashed #000000;
}
HTML:
<div id="rightsidebar">
<img style="background-color: #000000; width:300px; height:196px; border-top-left-radius:105px; -webkit-border-top-left-radius:110px;" src="{image:right image}">
</div>
<div id="leftsidebar">
<img style="background-color: #000000; width: 300px; height: 196px; border-top-right-radius: 105px; -webkit-border-top-right-radius: 105px;"src="{image:left image}">
</div>
My JSFiddle is here: http://jsfiddle.net/V73G5/
Using IE, you can see that the right container's image isn't doing the same as the left's, even though I just copy and pasted the code and edited it slightly. It does however work on Chrome, which makes me think this may be a bug. Any insight or suggestions on how to resolve this?
EDIT: I've found a way to work around it using:
border-radius: 105px 1px 0 0;
It's not a proper solution, and I've still no clue as to why this happened in the first place, but the 1px is barely noticeable and seems to make it work.
The behaviour of border radius is affected by compatibility mode in IE10.
If you press F12 you can view the developer console and change the compatability settings.
If the Document mode is set to IE7 or IE8 Standards then the border-radius-left: 10px; doesn't work, however if the standards mode is set to IE9 Standards or Standards then it behaves as expected.
download PIE.htc file and attached your css
#rightsidebar {
border-radius: 8px;
behavior: url(/pie/PIE.htc);
}
for more details check below image one.
may it will help you.
When using a rounded border on an image, webkit browsers hide the border behind the image
CSS
img {
border: 10px solid #000;
border-radius: 100%;
}
HTML
<img src="http://25.media.tumblr.com/tumblr_mbjei3b3re1r30y2do1_500.jpg" />
Bug reproduced # http://jsfiddle.net/zPpVm/
This is probably related to this Webkit bug, but I cannot find a suitable work around.
A possible workaround is to use a box-shadow:
box-shadow: 0 0 0 10px black;
Live Example
The main problem: It won't be calculated in the box-model
As another workaround, you can wrap your image like this:
<span class="img_container" >
<img src="http://25.media.tumblr.com/tumblr_mbjei3b3re1r30y2do1_500.jpg" />
</span>
Than style elements:
.img_container {
border: 10px solid #000;
border-radius: 100%;
display: inline-block;
overflow: hidden;
}
.img_container img {
display: block;
}
All modern browsers except Opera will render it correctly.
I have a problem with displaying a block with top/bottom border and border-radius. Don't know why an inside radius appears within a border.. Please, take look at the screenshot & code below..
http://img703.imageshack.us/img703/3074/scrren1.jpg
<section id="block">
<div class="block-header"><h1>Block</h1></div>
</section>
#block {width:1000px; height:329px; position:relative; border-radius:4px 4px 4px 4px; -webkit-border-radius:4px 4px 4px 4px;}
#block .block-header { position:absolute; right:0px; top: 0; border-top:10px solid #81a32b; width:500px; border-radius:0px 4px 0px 0px; -webkit-border-radius:0px 4px 0px 0px; }
Do u know any solution to this problem?
jsfiddle
In Opera the height is directly related to the rounding you are trying to achieve
Css
border-top:10px solid #81a32b;
border-radius:0px 10px 0px 0px;
Fiddle -> http://jsfiddle.net/325nH/2/
you have declared:
border-top:10px solid #81a32b;
border-radius:0px 4px 0px 0px;
so you are 6px short that are filled by Opera with white space
What I am trying to do is to round corners of a <select> using "border-radius". Strangely, webkit browsers show white background overflowing borders of the <select>.
Update
Here's the screenshot and my code:
HTML:
<select class="rounded_select">
<option>rounded_select</option>
</select>
CSS:
.rounded_select {
border-top: 2px solid #ccc;
border-left: 2px solid #ccc;
border-bottom: 2px solid #eee;
border-right: 2px solid #eee;
border-radius: 10px;
}
Are there any ideas how to fix it?
Update: It is preferrable to save the button image on the right of the select.
-webkit-appearance:none might do the trick.
EDIT: Yep that appears to do it: http://jsfiddle.net/dbxjB/
Setting background-color for the select seems to do the trick.
Edit: Does not. Setting border to 1px did it. As well as 2px dashed for example. Glitchy.
Opera has had support for box-shadow since v10.5, but it doesn't work on an input element.
input[type=text] {
background-color: #fff;
border: 1px solid #a0a0a0;
box-shadow: inset 1px 1px 1px #d2d2d2;
-o-box-shadow: inset 1px 1px 1px #d2d2d2;
}
<input type="text" name="test" />
This code works fine on Chrome and Firefox, I'm using Opera 11.01 on OSX 10.6. Can anybody help fix this?
It looks like a bug in Opera (I just reported it). You can use background: transparent; and it will work (assuming that the background of the container is also white).
Also, there's no -o-box-shadow, Opera supported the nonprefixed box-shadow property since it implemented it.
It does appear to be a bug, I however had a form where it was working and couldn't figure out why - stripping it down it appears that adding border-radius makes it appear (if you still need the background color and can't use Lea's solution) - if you don't want obvious rounded corners you can use a 1px radius
input[type=text] {
background-color: #fff;
border: 1px solid #a0a0a0;
box-shadow: inset 1px 1px 1px #d2d2d2;
border-radius: 1px;
}
Opera is ignoring many css properties on input elements. Box-shadow is not the only one. Text-shadow or text-transform are also ignored.
Using a button element istead of an input can be a solution when you deal with buttons.
Also, if you need background-color additional to Lea's solution, you can add one more inset shadow, like so
box-shadow: inset 0 1px 4px -1px rgba(0, 0, 0, .7), /*actual shadow*/
inset 0 0 100px 0 #fff; /*just white background*/