Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Ran into this problem when I was trying to add shadows to the thumbnail border image. Is there any way around this? :s
Here's the chunk of the code:
#content .item{
width: 285px;
height: 240px;
float: left;
margin: 0 10px 10px 0;
padding: 15px 0 0 15px;
background: url(../images/thumbnail.png) no-repeat;
background-size: 285px 240px;
box-shadow: -5px -5px 10px #CCC;
}
http://jsfiddle.net/ju3hxjuu/4
What is your problem Please Clearly Specify.
If you are talking about the white border around your images + shadow.
Then please note that the adding you just used making that white border because your div is larger than that of image inside that. If you want that shadow appear only around your images then you have to remove padding. like this :
#content .item{
width: 285px;
height: 240px;
float: left;
margin: 0 10px 10px 0;
background: url(../images/thumbnail.png) no-repeat;
background-size: 285px 240px;
box-shadow: -5px -5px 10px #CCC;
}
jsfiddle: http://jsfiddle.net/harshdand/ju3hxjuu/5/
u dont actually require an image to create thumbnail background
Html
<div class="item">
<img src="http://i.imgur.com/t2cfwup.png" alt=""/>
</div>
Css:
body{
background-color: #EEE;
}
.item{
width: 285px;
height: 240px;
float: left;
margin: 10px;
padding: 15px;
background-color:white;
background-size: 285px 240px;
box-shadow: 10px 10px 10px #CCC;
}
.item img{
width:100%;
}
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am trying to make a CSS shape with a rounded bottom corner with border-radius, but failing to understand how to:
.rounded-css {
border-radius: 5px;
display: block;
background: #669999;
width: 150px;
height: 200px;
}
<div class="rounded-css"></div>
Expected output:
You can use border-radius: 0 0 50% 50%; to make the whole bottom part round. With adding a white pseudo element ::after, you can "cut" the unwanted upper part to only show the curve:
.rounded {
border-radius: 0 0 50% 50%;
display: block;
background: #669999;
width: 100%;
height: 70px;
margin-top: -35px;
}
.rounded::after {
content: "";
display: block;
width: inherit;
height: 35px;
background: white;
}
<div class="rounded"></div>
I think you can adapt this to the container you want to put this in. I think it's pretty much what you are looking for.
.rounded-css {
border-radius: 100%;
display: block;
background: black;
border-bottom: 40px #669999 solid;
border-top: 40px transparent solid;
position: relative;
top: -60px;
overflow: hidden;
}
<div class="rounded-css"></div>
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I'm new in Html/CSS and now I'm trying to make a website (using only html and css) for a friend. In the footer I want to put a img like in this photo: How I want
But, All I could do, until now, was that:
What I could do until now
I could put the text and make the border the way I wanted, I could put a kind of blue color when the mouse hover and to be clickable in all the border space. But, I'm not beeing able to put this icon image righ inside. Can you help me?
Thanks a lot!
#footer {
height: 500px;
width: 100%;
bottom: 0;
background: #b6b6b6;
display: table;
color: white;
text-align: center;
background-repeat: no-repeat;
background-size: 100%;
}
#atua {
width: 30%;
display: inline-block;
text-align: initial;
}
.job {
border: 2px solid #ffffff;
width: 75%;
height: 35px;
margin: 0;
margin-bottom: 5px;
padding-top: 8px;
padding-left: 50px;
}
div #atua a {
text-decoration: none;
color: #ffffff;
}
div .job:hover {
background-color: #14aca9;
<div id="footer">
<div id="atua">
<h3>Área de Atuação</h3>
<p class="job">Trabalhista</p>
<p class="job">Empresarial</p>
<p class="job">Previdenciário</p>
<p class="job">Cívil</p>
</div>
</div>
This is an HTML/CSS version of what you want.
a {
display: inline-block;
background-image: url('http://static1.squarespace.com/static/51885970e4b0d20f07f4329d/t/519d043ae4b0f5d1146aa6ca/1369244735750/HD+TEXTURE+1.jpg');
background-size: cover;
padding: 3px;}
a span {
display: inline-block;
width: 200px;
padding: 10px 0 10px 50px;
border: 1px solid white;
color: white;
background-image: url('http://www.iconsdb.com/icons/preview/tropical-blue/square-xxl.png');
background-size: 39px 39px;
background-repeat: no-repeat;
}
a:hover span {
background-color: #14aca9;
}
<span>Trabalhista</span>
We need to see your code but if you want a simple answer this might help.
<footer style="height:100px;text-align:center;">
<a href="index.html"> <img src="click.jpg" height="100"/><a>
</footer>
I have a circular thing going on for my website (amitnkalra.github.io)
My image seems to be to big for this? How do I make this smaller and still show the same part of the image that it's showing right now.
I have the following code :
.profile {
border-radius: 150px;
-webkit-border-radius: 150px;
-moz-border-radius: 150px;
background: url(img/Avatar.jpg) no-repeat;
width: 200px;
-moz-box-shadow: 0 0 1px #7992ce;
box-shadow: 0 0 1px #7992ce;
margin: auto;
height: 200px;
}
Also, my social media icons aren't displaying, they're clickable, but the icons don't show-up, why is that?
Here's the code for that:
.Twitter {
width: 25px;
height: 25px;
background: url(img/Twitter.png);
margin: auto;
display: inline-block;
}
Your divs are way smaller (25x25) than your background images, so you're only seeing fractions of them. In order to fit them you can use:
background-size: 100%;
on all the elements that have social images set as backgrounds.
Ideally, in order to optimize the website performance and safe some bandwidth, you'd shrink those images down to 25x25 pixels (unless you use the big versions elsewhere).
body {
text-align:center;
}
.profilePicture {
border-radius: 150px;
-webkit-border-radius: 150px;
-moz-border-radius: 150px;
background-image: url(http://amitnkalra.github.io/img/anotherAvatar.jpg);
background-size: cover;
background-position: 45px top;
width: 200px;
height: 200px;
-moz-box-shadow: 0 0 1px #7992ce;
box-shadow: 0 0 1px #7992ce;
margin: auto;
}
.Twitter {
display: inline-block;
width: 50px;
height: 50px;
margin: auto;
}
.Twitter img {
height: 100%;
width: 100%;
}
<div class="profilePicture"></div>
<div class="Twitter"><img src="http://amitnkalra.github.io/img/Twitter.png" /></div>
The body css is not neccessary. I added it just to center the .Twitter
I used background-size: cover to ensure both width and height of the image fits the div and move the image to the left a bit by using background-position.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to create an html page exactly like the demo image:
I have created all three buttons using anchor tag with data-role=button with corresponding color and text. But now what i want is to align those circles in the way the image is shown and bring them in center of the html page. Please help me.
Thanks in advance.
Working example: http://jsfiddle.net/Ey6Yb/1/
HTML :
<div id="button-container">
<a data-role="button" id="btn_gotohomepage" class="button_eclipse">My account</a>
<a data-role="button" id="btn_gotologinpage" class="button_eclipse">Services</a>
<a data-role="button" id="btn_gotolistpage" class="button_eclipse">Offers</a>
</div>
CSS:
#button-container {
width: 145px;
height: 255px;
margin:0 auto;
}
.button_eclipse {
width: 100px !important;
height: 100px !important;
border-radius: 50% !important;
color: rgb(255,255,255) !important;
}
.button_eclipse .ui-btn-inner {
border-radius: 50% !important;
height: 80% !important;
}
.button_eclipse .ui-btn-inner .ui-btn-text {
display: block !important;
margin: 28px 0 0 -17px;
width: 95px !important;
height: 20px !important;
text-align: center !important;
/* TEXT CHANGES */
font: 14px Calibri,Arial !important;
text-shadow:1px 1px #AD4816 !important;
}
#btn_gotohomepage {
background: rgb(247,107,33) !important;
}
#btn_gotologinpage {
background: rgb(255,165,33) !important;
margin: -30px 0 0 40px;
}
#btn_gotolistpage {
background: rgb(157,16,33) !important;
margin: -30px 0 0 0;
}
EDIT :
Here's a solution centered horizontally and vertically : http://jsfiddle.net/Ey6Yb/3/
Change in your css file with below script:
.ui-content {
border-width: 0;
margin: 0 auto;
overflow-x: hidden;
overflow-y: visible;
padding: 15px;
width: 150px;
}
.btn_eclipse_services {
background: none repeat scroll 0 0 #FFA521 !important;
border: 0 none !important;
border-radius: 50% 50% 50% 50% !important;
color: #FFFFFF !important;
height: 100px !important;
margin-left: 35px;
margin-top: -30px;
width: 100px !important;
}
.btn_eclipse_offers {
background: none repeat scroll 0 0 #9C1021 !important;
border: 0 none !important;
border-radius: 50% 50% 50% 50% !important;
color: #FFFFFF !important;
height: 100px !important;
margin-top: -30px;
width: 100px !important;
}
Demo:
and for more you can check this link How to Center Anything With CSS
I have an box which is an image and I have text inside the image which will be geenrated dynamically.
Please look at the attached screenshot for more information.
How do I make sure that the image stretches when there is more text ?
.my-community-box{
background: url('/assets/my-community-box.png') no-repeat !important;
background-size: 100%;
width: 287px;
min-height: 474px;
float: right;
.my-community-details{
background-color: #mild-gray;
margin: 20px 10px 10px 10px;
padding: 5px;
ul{
width: 250px;
margin: 0 0 9px 0;
li{
}
}
a{
color: #darker-green;
}
a:hover{
text-decoration: none;
color: #light-green;
}
}
Why not use a border?
.my-community-box{
background: #F3F3F2;
width: 287px;
min-height: 474px;
float: right;
border: 3px solid #C5C3C3;
}
.my-community-box-wrap{
border-left: 2px solid #C2E2A0;
border-right: 2px solid #C2E2A0;
float: right;
}
Demo: http://jsfiddle.net/AWXHr/
you will need to background-repeat: repeat-y; the image, but will have to change it. as far as it seems, it is one single image - you will have to crop it to have the top border and the "body" of the image will be the part that you want to vertical repeat.
alternatively, due to the simple design, you could just use css borders
EDIT
also, as a few comments suggested, you should show us some code and not just an image, that would help a lot!
Use css border instead of image
div{
border:#333 solid 6px; border-radius:0 0 6px 6px;
box-shadow: 0px 0px 0px 2pt green;
height:auto;
width:200px;
background:#c1c1c1
}
Demo http://jsfiddle.net/wYUFD/12/
Demo
Hi now used to background-size:cover; or max-width
as like this
p{
max-width:200px;
border:solid 10px red;
background:url('http://www.gravatar.com/avatar/eb71f65106648cf6618b10423e8b0451?s=32&d=identicon&r=PG') no-repeat;
background-size:cover;
color:#fff;
}
Demo
I hope this may be helpful to you
.my-community-details{
background-color: #mild-gray;
margin: 20px 10px 10px 10px;
padding: 5px;
max-width: //set what depends up on your image width
max-height: //set what depends up on your image height
overflow-y: auto;