I'm developing my website, but I'm having a little problem. On my computer I can see the site like I want, but when I see in my notebook, a content is very to right! In my computer is normal. I'll have the site for you to see. It's in Portuguese, because I'm Brazilian. But please give a look at the source code. Or better, I will pass the code for you. The CLASS of the content of the right is: content-inner-jogo-destaque
And this is the code:
CSS:
.content-inner-jogo-destaque
{
position:absolute;
top:15px;
right:15px;
width:200px;
background-color: #ffffff;
padding: 10px 10px;
-webkit-box-shadow: inset 0 0 10px #1f325d;
-o-box-shadow: inset 0 0 10px #1f325d;
-moz-box-shadow: inset 0 0 10px #1f325d;
-ms-box-shadow: inset 0 0 10px #1f325d;
box-shadow: inset 0 0 10px #1f325d;
border-left: 3px solid #eeeeee;
border-right: 3px solid #eeeeee;
border-bottom: 3px solid #eeeeee;
border-top: 3px solid #eeeeee;
}
HTML:
<body>
<div class='content-inner-jogo-destaque'>
<p>Jogo da semana:</p>
<a href="testando"><img src="imagens/semana1.jpg" title="Clique para ir para a
página do jogo da semana" style="width:200px"/></a>
<font size="3"><font face="verdana,geneva">Dragon Ball Z Budo<font size="3">kai Tenkaichi 3</font></font></font>
</div>
</body>
Well, here is the site: www.ganggames.p.ht
Please take a look and tell me if something wrong.
Can I use CSS to change the pixels of the site?
Or a metatag?
Can you help me?
Thanks! :)
I have 3 things for you:
1) I think the main reason why your content is showing up on the right side of you page is because your content is set to "position: absolute" then you are telling it to stay 15px from the right of the page. That means that no matter how big or small your screen is, that DIV will ALWAYS be 15px from the right of the page.
You can keep the code you currently have if you wrap all of your content in a DIV with a set width:
<head>
<style>#wrapper {width: 'whatever-your-content-width-is';}</style>
</head>
<body>
<div id="wrapper">
<!--ALL OF YOUR CONTENT-->
</div>
</body>
You can also now neatly center all of your content if you would like with (optional):
<style>body {text-align: center;}</style>
2) For cross device compatibility, it is the standard for helping with viewing issues is this meta tag:
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
Further research of that tag can be found here:
https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag
3) Double check all of your BODY, HEAD, FOOTER, etc, tags! They aren't executed properly.
Hope this helped!
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.
I'm looking for CSS code on creating a solid colored table with an image and text wrap. This is to be used in Squarespace. Anyone know how I can get that?
<html>
<head>
<style type="text/css">
.mycss {
background-color: #997E6E;
border: 21px solid #997E6E;
color: #FFFFFF;
font-family: arial, helvetica, sans-serif;
font-size: 15px;
font-weight:normal;
letter-spacing: 1pt;
line-height:1;
word-spacing: 2pt;
text-align: left;
}
</style>
</head>
<body>
<p class="mycss">
As my teacher says, our bodies are the best technology we have! Through it, we can transform ourselves from being blocked and out of balance into being energetic, clear-minded and open-hearted.
</p>
</body>
</html>
If you're doing this outside of the developer platform...
I would put the class inside a div instead of p
<div class="mycss">
<p> As my teacher says, our bodies are the best technology we have! Through it, we can transform ourselves from being blocked and out of balance into being energetic, clear-minded and open-hearted.</p>
</div>
Your css looks fine for the border. If you want to float the image to the right inside this div, add
.mycss img {
float:right;
}
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.
CSS3 -webkit-transition is choking on multiple box-shadow values and text-shadow values. (Chrome & Safari)
More specifically, I have two scenarios...
I have text has a document heading that has three text-shadows (for appearance of depth). I am also using the -webkit-transition rule to change the color of the text-shadow on hover so that it appears to glow on hover.
I have links which I'm using the box-shadow rule on in the same way as above, with three values for depth effect. Also using -webkit-transition here to change the color of the buttons and text for a hover effect.
The Problem: For both instances above, when hovering over the elements webkit appears to render the transition as one at a time, so the values don't all fade into their new values simultaneously. Instead, they appear as each one is rendered - one after the other, and it is a very awkward transition as you'll see.
I have several instances, and here are links to some of them:
(make sure to view in Chrome or Safari)
-Text-shadow transition on :hover for page h1 ("GIFT of HEALING" text): http://cure.org/goh
-Box-shadow transition on :hover for 1st slide call to action ("Read More" button): http://cure.org
-Box-shadow transition on :hover for footer nav links (About, Rods, etc): http://tuscaroratackle.com
Finally, here's a sample of the code I'm using:
(Not from any site, just an example I built for this question; see it live here: http://joelglovier.com/test/webkit-shadow-transition-bug.html)
<!DOCTYPE HTML>
<html>
<head>
<style type="text/css">
ul {
overflow:hidden;
width:500px;
height:auto;
margin:50px 100px;
background:rgba(0,0,0,.4);
border:1px solid rgba(0,0,0,1);
-webkit-border-radius:10px;
-webkit-box-shadow:inset 0px 0px 5px rgba(255,255,255,.5),0px 2px 10px #6e5e4c;
-webkit-transition:all .5s ease;
}
ul:hover {
-webkit-box-shadow:inset 0px 0px 10px rgba(255,255,255,.5),0px 2px 10px #92d400;
}
li {
display:inline-block;
}
a:link,a:visited {
float:left;
display:block;
padding:6px 10px;
margin:10px 20px;
font:bold 18px/22px Tahoma,Helvetical,Arial,sans-serif;
text-decoration:none;
color:#000;
background:#92d400;
-webkit-border-radius:4px;
-webkit-box-shadow:inset 1px 1px 0px #b7f52f,0px 4px 0px #5c8500,0px 3px 10px #000;
-webkit-transition:all .5s ease;
}
a:hover,a:focus {
background:#198c45;
-webkit-box-shadow:inset 1px 1px 0px #1ac65c,0px 3px 0px #046228,0px 3px 10px #fff;
}
a:active {
position:relative;
top:1px
}
</style>
</head>
<body>
<ul>
<li>link 1</li>
<li>link 2</li>
</ul>
</body>
</html>
So the question here really is is there any way to prevent that ordered rendering, such as using different syntax in my CSS? (such as a specific order of the multiple box-shadow values, or using multiple box-shadow declarations instead of adding them all into one rule?)
05/09/2011 UPDATE: The bug has been reported to Webkit (see Husar's comment below). Also, I see that recent builds of Chrome (specifically my current 10.0.648.205 version) is rendering a smoothe transition now, effectively eliminating the bug. Safari however (version 5.0.5 (6533.21.1)) still displays the buggy rendering.
Apparently this is just a bug with webkit rendering, and there is no apparent fix.
I've also noticed that when you use jQuery, for example, to simply fade text in or out, WebKit "hiccups." So basically, I'm going to go out on a limb and say that I don't think your particular styles have anything to do with it. I could be completely wrong. If you find out what the deal is, I'd love to hear a solution because I too have run into this annoyance a time or two.
this could help to fix this problem on rendering for hovering events
-webkit-transform: translateZ(0px);
-moz-transform: translateZ(0px);
Using the code below, both Chrome and Opera (latest versions supporting border-radius) on Mac show a small blue area outside the rounded corners (which seems to a part of the defined background-image). Why?
<!doctype html>
<head>
<title>Testcase for rounded corners on submit button with bg-image</title>
<style type="text/css">
input[type="submit"] { background: url(http://skriblerier.net/div/rounded-corners-input/bg-bottom.png); color: #fff; height: 40px; width: 150px; border-radius: 10px; border: 1px solid #fff; font-size: 14px }
</style>
</head>
<body>
<form>
<div><input type="submit" /></div>
</form>
</body>
I worked around this with background-clip: http://www.css3.info/preview/background-origin-and-background-clip/
background-clip: padding-box;
-moz-background-clip: padding;
-webkit-background-clip: padding;
FF3.6 does it as well, but not as noticeably (with -moz-border-radius, of course). Looks like they're trying to automatically smooth out the corners, and just can't hide all of the background when there's also a border applied. Removing the border declaration (not the border radius) will fix it. So:
border-radius: 10px; border: 1px solid #fff; making it: border-radius: 10px;
I suspect, but don't know, that this has to do with the difficulties of faking half-pixels and nesting round shapes in more of a bitmap than vector 'space'.