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>
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 1 year ago.
Improve this question
I'm making a website and I have one problem: the middle button is located differently from the other buttons. Here's what the source code looks like:
<!DOCTYPE HTML>
<html>
<h1 style="text-align:center;color:darkblue;font-family:franklin gothic"><b><i>DAVE J'S OFFICIAL WEBSITE</b></i></h1>
<button style="text-align:center;color:slateblue;background:lightgreen;font-family:courier new;height:50px;width:75px;font-size:17px"><b><i>HOME</i></b></button>
<button style="text-align:center;color:slateblue;background:lightgreen;font-family:courier new;height:50px;width:75px;font-size:17px;position:relative;"><b><i>SOCIAL MEDIA</i></b></button>
<button style="text-align:center;color:slateblue;background:lightgreen;font-family:courier new;height:50px;width:75px;font-size:17px"><b><i>BLOG</i></b></button>
</div>
</html>
Can you please tell me where's the problem? Thank you for help! :-)
Interesting. I didn't realize that the text inside a button behaves that way. Seems to have a life of its own.
A couple of errors to begin with:
missing opening div
b and i reversed in h1
Fix:
add flex to wrapping div.
h1 {
color: darkblue;
font-family: franklin gothic;
font-style: italic;
font-weight: bold;
text-align: center;
}
div {
display: flex;
}
button,
.btn {
background: lightgreen;
color: slateblue;
font-family: courier new;
font-size: 17px;
font-style: italic;
font-weight: bold;
height: 50px;
text-align: center;
width: 75px;
}
<h1>DAVE J'S OFFICIAL WEBSITE</h1>
<div>
<button>HOME</button>
<button style="position:relative;">SOCIAL MEDIA</button>
<button>BLOG</button>
</div>
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 7 years ago.
Improve this question
I am working with a list that needs to work with mobile. When I shrink the window width down, most li elements shrink with the page but "SETUP" is dropping down. I'm using bootstrap.
.dollar {
font-size: 20px;
font-weight: 600;
vertical-align: top;
position: relative;
top: 17px;
}
.price {
font-size: 83px;
line-height: 1em;
padding: 0 3px;
font-weight: 200;
vertical-align: middle;
margin-right: -15px;
}
.price.in.table2 {
margin-bottom: 20px;
}
.price.in.table2 span {
color: #262626;
}
<ul>
<li>
<div class="price in table2">
<sup class="dollar">$</sup>
<span class="price">5000</span>
<span class="afterprice">/ ONE-TIME SETUP</span>
</div>
</li>
</ul>
You can set the whitespace property, but if it doesn't wrap it's going to overflow its container, which is worse from a design perspective. You're better off reducing the font size in a media query so that neither happens at that minimal break point.
you can use in css white-space: nowrap for <li> or for css class .price on <div> tag.
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
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 7 years ago.
Improve this question
i have my main "watchlisten" div, with everything you see so far inside, but for some apparent reason, i am unable to float my video image on the right side of my left arrow image, i have this as the code for CSS and HTML, i apologize for not having the images available for you to see them, but i want to float Video_1.jpg on the right of Left_watchlisten.jpg.
HTML for the whole watchlisten DIV
<div id="watchlisten">
<img src="Images/boxes.png" class="imageBoxes" />
<h2>Watch/Listen</h2>
<img src="Images/Left_Watchlisten.jpg" class="leftarrow"/>
<div class="wlblock">
<img src="Images/Video_1.jpg" height="75"/>
<p>action to cut leve crossing deaths</p>
</div>
</div>
CSS code for all the classes/id's/h2.
#watchlisten {
background-color: #EEEEEE;
float: right;
width: 380px;
position: relative;
top: -80px;
}
h2 {
color: #505050;
margin: 10px 0 10px 10px;
font-size: 1.8em;
}
.imageBoxes {
float: right;
max-height: 20px;
max-width: 100%;
margin: 12px 10px 0 0;
}
.leftArrow {
float: left !important;
border-right: 1px solid white;
}
.wlblock {
float: left;
}
i hope someone can help, i am a little stuck.
There is problem in your class naming
Your CSS code:
.leftArrow {
float: left !important;
border-right: 1px solid white;
}
Your HTML code:
<img src="Images/Left_Watchlisten.jpg" class="leftarrow"/>
Can you see the difference in class name?
Make the leftArrow, leftarrow in css or leftarrow in html to leftArrow.
It will work.
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.