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 have a website that needs a few css made banners and I'm having a bit of trouble creating them. I would show you what I had, but their too embarrassing to share...
My goal is to try and only use html and css to build these instead of images. This is kind of what I'm trying to build with the text inside of it...I think that is where I'm failing.
Any help would be much appreciated and would save my head the pain of hitting against the wall.
The only thing you need is a <div> element and manipulate the CSS.
Have a look here and here as they have everything that you will need to get started
I've also created a Fiddle for you that will give you the effect you want.
EXAMPLE
HTML
<div class="bookmarkRibbon"></div>
CSS
.bookmarkRibbon{
width:0;
height:100px;
border-right:50px solid blue;
border-left:50px solid blue;
border-bottom:30px solid transparent;
}
And here is your flag with text inside as you show it in the picture.
EXAMPLE
HTML
<div class="ribbon">BANNER</div>
CSS
.ribbon {
text-align:center;
display:block;
width:100px;
height:100px;
background:#d00202;
}
.ribbon:after {
content:"";
display:block;
position:relative;
top:80px;
width:0;
height:0;
border-width:30px 50px 50px 50px;
border-style:solid;
border-color:#d00202 #d00202 transparent #d00202;
}
Related
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 last year.
Improve this question
I have two divs placed up and down as mentioned in the image. I want to draw a vertical connecting line between these two divs. I used pipe (|) font to do this. But, it is not looking elegant. Can someone help me to draw an elegant vertical line between the divs?
Use border-left:4px dashed blue; property to create a dashed line for connecting the two divs.
.box {
width:80%;
margin-left:10%;
height:70px;
background: grey;
}
.vl {
border-left: 4px dashed blue;
height: 40px;
margin-left:50%
}
<div class="box"></div>
<div class="vl"></div>
<div class="box"></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 2 years ago.
Improve this question
The footer is at the bottom as intended on my Home page and Form page. But something is causing the footer to appear at the top of my Gallery page. I'm assuming it's an issue with specificity or one of my selectors. But I'm new to this and so far everything I've tried hasn't resolved the issue.
My footer code is basic so something else must be forcing it to the top. I checked the Gallery ID's and none of them appear to be effecting my footer element.
footer {
background:#333333;
color:#FFFFFF;
padding:10px;
}
/* || gallery-items */
.gallery-item {
text-align:center;
width:300px;
height:300px;
margin:10px;
background-color:#ADD8E6;
border:10px solid #333333;
border-radius:4px;
float:left;
object-fit:contain;
}
/* || gallery item hover */
.gallery-item:hover {
border-color:#03A9FC;
}
Here is a link to my Replit. I apologize for not being able to asses what the root of the issue. This is my first week doing CSS styling.
Your .gallery-item has float: left; this means that those elements don't get "considered" as taking any space when rendering the other elements on your page. You can put a div with a style clear: both (in your case only clear:left will work) between your gallery and your footer elements to fix this
Add overflow: hidden; on #gallery-content
#gallery-content{
overflow: hidden;
}
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
Please have a look at my code, I've spent several hours finding a solution to no avail. I'm not a professional Web Developer, I'm just doing this for our project at school.
http://cssdesk.com/6L2sN
What I'm trying to do is, the Black div is at the most top, and then the red below it, then green below it, same goes to the blue one. But it's doing the opposite. I don't understand why, is z-index not working as it should?
Give the items an position: relative, that should work.
Edit: And don't use negative z-index. Just give the element which should lie on the top, the highest, the second one the second highest,...
So the code should looke like:
<style>
#head{
position:relative;
z-index:100;
height:150;
width:222;
background-color:black;
}
#item1{
margin-top:-110;
z-index:90;
transition:0.5s;
background-color:red;
width:222;
height:192;
position: relative
}
#item1:hover{
margin-top:0;
transition:0.5s;
}
#item2{
z-index:80;
transition:0.5s;
margin-top:-110;
background-color:green;
width:222;
height:192;
position: relative
}
#item2:hover{
margin-top:0;
transition:0.5s;
}
#item3{
z-index:70;
transition:0.5s;
margin-top:-110;
background-color:blue;
width:222;
height:192;
position: relative
}
#item3:hover{
margin-top:0;
transition:0.5s;
}
</style>
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
Well I don't know how to explain it correctly. Here, check this screenshot which has what I want to make. My designer gave me this. If I don't find a solution i'll use images and no code. Is it possible to do this with CSS3?
Here is the image
See the triangle inside that box? I want to do this. Thank you!
Creative use of borders to achieve this effect, no images were harmed in the following sample and you can even set the position of the arrow on the element itself - becomes more straightforward if you can hardcode it for your design.
HTML
<div class="top">
<span class="arrow" style="left:40%"></span>
</div>
CSS
.top {
background:url(http://blog.positscience.com/wp-content/uploads/2013/08/ice-cream3.jpg);
background-size:cover;
width:300px;
height:300px;
border:1px solid #888;
position:relative;
overflow:hidden;
}
.arrow {
border:30px solid #aaa;
border-bottom:none;
border-color:transparent #aaa transparent #aaa;
position:absolute;
left:0;
bottom:0;
}
.arrow:before, .arrow:after {
content:'';
position:absolute;
width:5000px;
bottom:0;
height:30px;
background:#aaa;
}
.arrow:before {
right:30px;
}
.arrow:after {
left:30px;
}
Working JSfiddle sample.
Or the full integrated sample here.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am trying to see if its possible to achieve this kind of shadow using pure css3:
I quickly mocked this up in photoshop. I am looking for that curved shadow effect. I know its possible to get straigt shadow effects. I tried to look on google I dont even know what to call that curved shadow. I couldn't find anywhere that says its not possible. Couldnt find anywhere that says it IS possible either.
if css3 isn't happening, I am willing to use jQuery.
any help, much appreciated.
thanks.
edit: The closest I've gotten to achieve any sort of shadow just with css3 is this: http://jsfiddle.net/tVt4w/
At first I didn't think it was possible. Then I found this page that shows some nice examples in pure css.
Nifty.
See the demo page for an idea of what can be achieved.
HTML and CSS only
The shadow automatically adapts to the width of the image.
Using a PNG image, this can be done:
(not exhaustively tested for compatibility but it works in the latest FF, Safari and Chrome)
<style type="text/css" media="all">
.shadow {
position:relative;
width:auto;
padding:0;
margin:0;
}
.shadow:before,
.shadow:after {
content:"";
position:absolute;
z-index:-1;
}
.arch01:after {
position:absolute;
padding:0; margin:0;
height:34px;
width:100%;
bottom:-30px;
left:0px; right:0px;
background-image: url('arch_01.png');
background-size:100% 100%;
background-position:left top;
}
</style>
<span class="shadow arch01">
<img src="photo.jpg" width="500px" height="250px">
</span>