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 7 years ago.
Improve this question
I am trying to achieve a desired effect where the div that holds the sections background is slanted to one direction. I was able to make a div diagonally over the top portion of the div using This solution, but I realized There is another background that needs to be seen and adding a div on top of the main content would just be a line instead of the div just slanting on top.
Is there a way to pull this effect off through Css ?
<html>
<head>
<style>
div.background {
background: url(klematis.jpg) repeat;
border: 2px solid black;
}
div.transbox {
margin: 30px;
background-color: #ffffff;
border: 1px solid black;
opacity: 0.6;
filter: alpha(opacity=60); /* For IE8 and earlier */
}
div.transbox p {
margin: 5%;
font-weight: bold;
color: #000000;
}
</style>
</head>
<body>
<div class="background">
<div class="transbox">
<p>This is some text that is placed in the transparent box.</p>
</div>
</div>
</body>
</html>
try this example
or go to http://www.w3schools.com/css/tryit.asp?filename=trycss_transparency
hope this helps
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I am making a website for a school project and i'm trying to make the height of a border fit the size of the text. however, whenever i adjust the height the text doesn't go with it and i'm not sure how to fix this.
Code:
#slidercompare {
font-size: 17px;
font-family: sans-serif;
border-style: solid;
border-color: grey;
opacity: 87%;
position: absolute;
top: 5px;
right: 10px;
}
#slidercompare {
width: 355px;
height: 40px; /* for some reason I can't adjust the height smaller than this or else the border goes through the text. */
color: white;
background-color: black;
}
<html>
<head>
<link rel="stylesheet" href="css/boardgames.css">
</head>
<body>
<h1 id="slidercompare"><br>Chess.com (left) vs Video Chess (right)</h1>
</body>
</html>
Any ideas? Thanks
May this be what you are trying to achieve?
#slidercompare {
font-size: 17px;
border-style: solid;
border-color: grey;
opacity: 87%;
}
#slidercompare {
width: fit-content;
color: white;
background-color: black;
}
<h1 id="slidercompare">Chess.com (left) vs Video Chess (right)</h1>
I inserted <br> to <h1>. Used that to seperate a thing earlier i dont need to seperate now. So, removing the <br> tag fixed the issue.
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 2 years ago.
Improve this question
I wanted to have a navigation bar that has white text links without it underlined but instead it has appeared with basic links in a div so hasn't worked but I don't know what is missing.
Any suggestions would be apricated.
<html>
<style>
.box3{
padding:7px;
background: black;
font-family: arial;
font-size:15px;
}
</style>
<div class="box3">
Home
About
Contact
</div>
</html>
You will need to add style to your links, for example you can add
.box3 a {
color: white;
text-decoration: none;
}
This will change the color to white and remove the underline.
.box a { css } will only target the a tags inside of the box3 div
.box3 {
padding: 7px;
background: black;
font-family: arial;
font-size: 15px;
}
.box3 a {
color: white;
text-decoration: none;
}
<div class="box3">
Home
About
Contact
</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 7 years ago.
Improve this question
I need to show the divider for every labels is there any option in Bootstrap to show the vertical divider or in css like the below image.
Vertical Dividers have been dropped in Bootstrap 3. See here
You'll have to code on your own
or you can add this code to your style-sheet
.navbar .divider-vertical {
height: 40px;
margin: 0 9px;
border-left: 1px solid #f2f2f2;
border-right: 1px solid #ffffff;
}
This is how I would do it:
li {
display: inline;
padding: 10px;
color: white;
border-right-style: solid;
border-right-width: 2px;
border-image: linear-gradient(to bottom, transparent, gray, transparent) 1 100%;
border-left-width: 0px;
}
Here is the JSFiddle demo
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 7 years ago.
The community reviewed whether to reopen this question 8 months ago and left it closed:
Needs details or clarity Add details and clarify the problem by editing this post.
Improve this question
While making a form in HTML which will get converted to PDF, I just realized there is no HTML tag that conveys the meaning that the underlined block is a signature (or should be signed).
Any suggestions on how to use a semantically correct HTML element for a signature?
Why not use an input? This way, you get the correct semantics. For example, screen readers will understand that the user is expected to submit information.
.signature {
border: 0;
border-bottom: 1px solid #000;
}
<input type="text" class="signature" />
You can make an input tag, then style it so that it only has a border on the bottom
input {
border: none;
border-bottom: 1px solid black;
}
Simple codepen to illustrate the idea
Edit: Just noticed somebody else posted the same solution while I was typing this. What's with all the downvotes of these answers?
There are a couple of things you could do to achieve this. Option number one is a div with a border-bottom, but that is not editable. That can be viewed here:
#signaturename {
text-align: center;
font-weight: bold;
font-size: 150%;
}
#signature {
width: 100%;
border-bottom: 1px solid black;
height: 30px;
}
<div id="signaturename">
Signature:
</div>
<div id="signature">
</div>
The seconds option, which is editable, would be just a simple input box:
#signaturetitle {
font-weight: bold;
text-align: center;
font-size: 150%;
}
#signature {
width: 100%;
border: 0px;
border-bottom: 1px solid black;
height: 30px;
}
<div id="signaturetitle">
Signature:
</div>
<input type="text" id="signature">
EDIT
Now just thinking of another way to achieve what you would like! :)
You could perhaps use _, but there would be spaces right? False, there is a work around! View here:
#signaturetitle {
text-align: center;
font-weight: bold;
font-size: 200%;
}
#signature {
text-align: center;
height: 30px;
word-spacing: 1px;
}
<div id="signaturetitle">
Signature:
</div>
<div id="signature">
______________________________
</div>
As you can see with this one I am simply just adding the CSS property word-spacing.
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 8 years ago.
Improve this question
I am trying to create a thin arrow (direction towards right) using css.
I have created the circled div but stuck with the arrow
<div class="circleBase type2"></div>
I have created the fiddle and also attached the reference image
http://jsfiddle.net/squidraj/c9eyrat6/
Any hint/suggestion/reference link would do great. Thanks in advance.
Here's one option using a pseudo-element although an image or SVG would probably be preferable.
JSfiddle Demo
CSS
.circleBase {
border-radius: 50%;
behavior: url(PIE.htc); /* remove if you don't care about IE8 */
overflow: hidden;
box-sizing: border-box;
}
.type2 {
width: 50px;
height: 50px;
background: #ccc;
border: 3px solid #000;
position: relative;
}
.type2:before {
content:"";
position: absolute;
top:0;
right:50%;
width:100%;
height:100%;
border:2px solid white;
transform:rotate(45deg) ;
}
Added a div and gave it a white border check if this suits your interest http://jsfiddle.net/c9eyrat6/6/
#line{
transform:rotate(-10deg);
width:120px;
height:120px;
border:5px solid white;
}