How can I insert the skill name inside the progress bar? - html

I am working on my resume and I want the skill name inside the progress bar, and not above. But I dont get it. Thx
this is the web: http://working.virgiliodelavega.com/
<span class="skills-each">Illustrator</span>
<div class="progress-bar blue">
<span style="width: 90%"></span>
</div>
.skills-title {
font-size: 1em;
}
.skills-each {
font-size: .8em;
}
.progress-bar {
background-color: #727e7f;
height: 25px;
padding: 3px;
}
.progress-bar span {
display: inline-block;
height: 100%;
}
.blue span {
background-color: #34495e;
}
.red span {
background-color: #e74c3c;
}

I would recommend a change in markup. Using lists is a lot cleaner than divs/spans.
http://codepen.io/cimmanon/pen/Hikxp
ul.skills {
padding: 0;
}
ul.skills li {
background-color: #727e7f;
position: relative;
line-height: 2em;
margin: 1em 0;
padding: 0 .5em;
position: relative;
color: white;
}
ul.skills li span {
position: relative;
z-index: 10;
font-size: .8em;
}
ul.skills li:after {
position: absolute;
left: 3px;
top: 3px;
bottom: 3px;
content: '';
}
ul.skills li.seven:after {
width: 70%;
}
ul.skills li.eight:after {
width: 80%;
}
ul.skills li.nine:after {
width: 90%;
}
ul.skills li.ten:after {
right: 3px;
}
ul.skills.graphic li:after {
background-color: #34495e;
}
ul.skills.web li:after {
background-color: #e74c3c;
}
<h1>Graphic Skills</h1>
<ul class="skills graphic">
<li class="eight"><span>Illustrator</span></li>
<li class="ten"><span>Photoshop</span></li>
<li class="nine"><span>Indesign</span></li>
</ul>
<h1>Web Development</h1>
<ul class="skills web">
<li class="seven"><span>Illustrator</span></li>
<li class="eight"><span>Photoshop</span></li>
<li class="nine"><span>Indesign</span></li>
</ul>

hi you can try this way if you want
html
<span class="skillEachWrap"> <span class="skills-each">Illustrator</span></span>
<div class="progress-bar blue">
<span style="width: 90%"></span>
</div>
css
.skillEachWrap {
float:left;
position:relative;
}
.skills-each {
font-size: .8em;
position:absolute;
top:7px;
left:10px;
}
working demo hope this help you.....

You can use position:absolute to place the text on top of your progress bar. Then use line-height:25px to center the text vertically within the bar. I also recommend you give you bar a class and not just target it as span since we have multiple children in .progress-bar now.
jsFiddle
HTML
<div class="progress-bar blue">
<span class="bar" style="width: 80%"></span>
<span class="name">Photoshop</span>
</div>
CSS
.progress-bar {
background-color: #727e7f;
height: 25px;
padding: 3px;
position:relative;
}
.progress-bar .bar {
display: inline-block;
height: 100%;
}
.progress-bar.blue .bar {
background-color: #34495e;
}
.progress-bar .name {
color:#FFF;
position:absolute;
left:10px;
line-height:25px;
}

Related

CSS, vertical delimeter between inline-block buttons(links)

I have few button and want to add vertical delimeter(separator) between 'Button 1' and 'Button 2'. I understand that can wrap my link in div with border:
<div id="delimeterDiv" style="border-right: 1px solid #C0C0C0;">
</div>
but I want my links in one line. If I add another div it starts from another line..
Here is jsfiddle:
https://jsfiddle.net/Rockietm/dtnwmdho/
Here is what I want to get:
and here is code:
<style>
#buttons {
margin-bottom: 12px;
height: 46px;
}
#buttons > a {
color: black;
padding: 10px;
margin-right: 15px;
margin-top: 2px;
font-size: large;
text-decoration: none;
display: inline-block;
}
/* button colors */
#buttonone {
background-color: #DCDCDC;
}
#buttontwo {
background-color: #C4E2F3;
}
#buttonthree {
background-color: #B2F0C8;
}
</style>
<div id="buttons">
<a id="buttonone" href="#" >Button 1</a>
<a id="buttontwo" href="#">Button 2</a>
<a id="buttonthree" href="#">Button 3</a>
</div>
You can add :after to the button and style it to look like a border
#buttons > a:after {
content:'';
position:absolute;
top: 0;
right: -10px;
height:100%;
width: 1px;
background: #000;
}
#buttons > a:last-child:after{
width: 0;/*remove border from the last button*/
}
See jsfiddle
Similar base for answer (pseudo + absolute) with a différent approach to complete #Chiller answer's.
#buttons>a:first-child~a:before {
content: '';
border-left: double gray;
position: absolute;
top: 0;
bottom: 0;
left: -12px;
}
}
#buttons {
margin-bottom: 12px;
height: 46px;
}
#buttons>a {
color: black;
padding: 10px;
margin-right: 15px;
margin-top: 2px;
font-size: large;
text-decoration: none;
display: inline-block;
position: relative;
}
/* button colors */
#buttonone {
background-color: #DCDCDC;
}
#buttontwo {
background-color: #C4E2F3;
}
#buttonthree {
background-color: #B2F0C8;
}
<div id="buttons">
<a id="buttonone" href="#">Button 1</a>
<a id="buttontwo" href="#">Button 2</a>
<a id="buttonthree" href="#">Button 3</a>
</div>
<!--buttons-->
https://jsfiddle.net/dtnwmdho/3/
Should help you:
#buttons> a:first-child:after {
border-right: 1px solid black;
content: " ";
position: relative;
right: -20px ;
padding: 10px 0;
}

Submenu placement HTML

I made my submenu appear when I hover over one option in menu. However when I do it it extends menu height (PIC1). I tried setting menu height on 56px and then it doesn't extend but it ruins my whole layout (PIC2). I also tried putting position:absolute in empty div between menu_option and submenu but then submenu changes sizes and loses attributes (PIC3).
#menu {
margin-bottom: 20px;
background-color: #73818c;
padding: 10px;
}
.menu_option {
float: left;
min-width: 100px;
text-align: center;
border-right: dotted 2px black;
padding: 10px;
font-size: 16px;
}
.submenu {
text-align: center;
border-bottom: dotted 2px black;
padding-top: 10px;
padding-bottom: 10px;
display: none;
font-size: 13px;
}
.submenu:hover {
background-color: white;
}
.menu_option:hover div {
display: block;
}
.menu_option:hover {
background-color: lightgray;
cursor: pointer;
}
<div id="menu">
<div class="menu_option">Strona główna</div>
<div class="menu_option">Galeria</div>
<div class="menu_option">Reżyserzy
<div>
<div class="submenu" style="margin-top:10px">Quentin Tarantino</div>
<div class="submenu">Bracia Coen</div>
<div class="submenu">Wes Anderson</div>
</div>
</div>
<div class="menu_option">Ulubione filmy</div>
<div class="menu_option">Seriale</div>
<div class="menu_option">Kontakt</div>
<div style="clear:both"></div>
</div>
Setting position: absolute on the div that holds the submenus (and position: relative on the menu options) will keep the height of that div (and its contents) from affecting the height of its parent elements.
#menu {
margin-bottom: 20px;
background-color: #73818c;
padding: 10px;
}
#menu, #menu * {
box-sizing: border-box;
}
.menu_option {
float: left;
min-width: 100px;
text-align: center;
border-right: dotted 2px black;
padding: 10px;
font-size: 16px;
position: relative;
}
/* I've added this class to the div around the .submenus */
.submenu_wrapper {
position: absolute;
background: lightgray;
left: 0;
right: 0;
}
.submenu {
text-align: center;
border-bottom: dotted 2px black;
padding-top: 10px;
padding-bottom: 10px;
display: none;
font-size: 13px;
}
.submenu:hover {
background-color: white;
}
.menu_option:hover div {
display: block;
}
.menu_option:hover {
background-color: lightgray;
cursor: pointer;
}
<div id="menu">
<div class="menu_option">Strona główna</div>
<div class="menu_option">Galeria</div>
<div class="menu_option">Reżyserzy
<div class="submenu_wrapper"> <!-- new class -->
<div class="submenu" style="margin-top:10px">Quentin Tarantino</div>
<div class="submenu">Bracia Coen</div>
<div class="submenu">Wes Anderson</div>
</div>
</div>
<div class="menu_option">Ulubione filmy</div>
<div class="menu_option">Seriale</div>
<div class="menu_option">Kontakt</div>
<div style="clear:both"></div>
</div>
add to the end of your CSS
menu_option:hover > div{
position:absolute;
top:10px;
}
.menu_option
{
position:relative;
}
Here is an Example
add an id named main_bx to the div that holds all divs with class .submenu and
.main_bx{
display:none;
}
.menu_option:hover .main_bx {
display: block;
position:absolute;
}
#menu {
margin-bottom: 20px;
background-color: #73818c;
padding: 10px;
height: 40px;
overflow: visible;
}
see snippet below (The window is small so you are going to find some wrapping in this snippet)
#menu {
margin-bottom: 20px;
background-color: #73818c;
padding: 10px;
}
.menu_option {
float: left;
min-width: 100px;
text-align: center;
border-right: dotted 2px black;
padding: 10px;
font-size: 16px;
}
.submenu,.main_bx {
text-align: center;
border-bottom: dotted 2px black;
padding-top: 10px;
padding-bottom: 10px;
font-size: 13px;
}
.submenu:hover {
background-color: white;
}
.main_bx{
display:none;
}
.menu_option:hover .main_bx {
display: block;
position:absolute;
}
.menu_option:hover{
background-color: lightgray;
cursor: pointer;
}
#menu {
margin-bottom: 20px;
background-color: #73818c;
padding: 10px;
}
<div id="menu">
<div class="menu_option">Strona główna</div>
<div class="menu_option">Galeria</div>
<div class="menu_option">Reżyserzy
<div class="main_bx">
<div class="submenu" style="margin-top:10px">Quentin Tarantino</div>
<div class="submenu">Bracia Coen</div>
<div class="submenu">Wes Anderson</div>
</div>
</div>
<div class="menu_option">Ulubione filmy</div>
<div class="menu_option">Seriale</div>
<div class="menu_option">Kontakt</div>
<div style="clear:both"></div>
</div>

CSS hover table cell

I got a table and I would like to have different text boxes when hovering on cells.
<div class="plan">
<h2 class="title">Premium</h2>
<div align="center">
<p class="plan-price">499<span>€</span></p>
</div>
<ul class="plan-features">
<li><strong>Hello1</strong></li>
<li><strong>Hello2</strong></li>
<li><strong>Hello3</strong>></li>
<li><strong>Hello4</strong></li>
<li><strong>Hello5</strong></li>
</ul>
Start Now
</div>
I would like to show a box with some text when for example a user move the pointer over Hello1.
This is the css code
.plan-features {
margin-bottom: 20px;
line-height: 2;
font-size: 12px;
color: #999;
text-align: center;
}
.plan-features > li > strong {
font-weight: bold;
color: #888;
}
.box:hover{
text-align: center;
color: white;
width: 200px;
margin: 10px -12px;
height: 100px;
background-color: rgba(0,0,0, 0.8);
}
I tried to add this to the first <li> tag
<ul class="plan-features">
<div class="box"><li><strong>Hello1</strong></li></div>
but obviously the box is shown with the text "Hello1", how can i hide "hello1" and add some other text?
You can do something like this! i tried to implement according to your requirements. But do explain what are you trying to achieve from this. Should there be different text for each li element? There are other ways too. Which would be simpler than this
HTML
<div>
<strong class="overlap hoverOn">Hello1</strong>
<strong class="overlap hide">someText</strong>
</div>
CSS
div
{
position:relative;
}
.overlap
{
position:absolute;
top:0; left:0;
}
.hide {
display: none;
background: red;
}
.hoverOn:hover + .hide {
display: block;
}
JSfiddle Sample
Cheers!
Try something like this:
HTML
<li><strong hover-text="Some text1">Hello1</strong></li>
CSS
strong:hover {
font-size: 0;
}
strong:hover:before {
font-size: 12px;
content: attr(hover-text);
}
Full code here: https://jsfiddle.net/5qkruhuc/
I found this solution using JavaScript, but the <div id="mynav" class="box"> is always shown except when I click on "x". Instead I want that the box is shown only when I click on "Hello1" and closed after have clicked on the "x"
Here's the code
JavaScript:
<script>
function openNav() {
document.getElementById("myNav").style.width = "100%";
}
function closeNav() {
document.getElementById("myNav").style.width = "0%";
}
</script>
CSS:
.plan-features {
margin-bottom: 20px;
line-height: 2;
font-size: 12px;
color: #999;
text-align: center;
}
.plan-features > li > strong {
font-weight: bold;
color: #888;
}
.box{
text-align: center;
color: white;
width: 200px;
margin: 10px -20px;
height: 100px;
background-color: rgba(0,0,0, 0.8);
overflow-x: hidden;
transition: 0.5s;
}
.closeButton {
color: yellow;
top: 20px;
right: 45px;
}
HTML:
<ul class="plan-features">
<div id="myNav" class="box">
x
<br />Some Text
</div>
<li onclick="openNav()"><strong>Hello1</strong></li>
<li><strong>Hello2</strong></li>
<li><strong>Hello3</strong></li>
<li><strong>Hello4</strong></li>
<li><strong>Hello5</strong></li>
</ul>
Simply do this
HTML Code:
<div class="plan">
<h2 class="title">Premium</h2>
<div align="center">
<p class="plan-price">499<span>€</span></p>
</div>
<ul class="plan-features">
<li><strong>Hello1</strong></li>
<li><strong>Hello2</strong></li>
<li><strong>Hello3</strong>></li>
<li><strong>Hello4</strong></li>
<li><strong>Hello5</strong></li>
</ul>
Start Now
</div>
CSS Code :
.plan-features {
margin-bottom: 20px;
line-height: 2;
font-size: 12px;
color: #999;
text-align: center;
}
.plan-features li strong:hover {
text-align: center;
color: white;
width: 200px;
margin: 10px -12px;
height: 100px;
background-color: rgba(0,0,0, 0.8);
}
Working example: https://jsfiddle.net/rajnikpatel/e7rrk9xy/

Aligning text to center of last div

I am new due css & Html design. I am facing an issue in aligning text to center of a last div.
I have created js fiddle :http://jsfiddle.net/80sems56/
Please help aligning last div text "Stress" to center of last image.
Code is like:
<div>
<div id="imgWeight" class="floatLeft">
<img alt="Body Weight" class="icon110" src="../../images/OnTrack/bmi_icon_100.png"/>
<div class="textaligncenter">Body Weight</div>
</div>
<div id="imgBloodPressure" class="margin5 floatLeft">
<img alt="Blood Pressure" class="icon110" src="../../images/OnTrack/health_manager_icon_100.png"/>
<div class="textaligncenter">Blood Pressure</div>
</div>
<div id="imgStress" class="floatleft">
<img alt="Stress" class="icon110" src="../../images/OnTrack/stress_icon_100.png"/>
<div class="textaligncenter">Stress</div>
</div>
</div>
css
.
padding20px{
padding:20px;
}
.margin20px{
margin:20px;
}
.imgSteps{
padding:20px;
position:absolute;
}
.bckColor{
background-color: #secondary;
color:#white;
}
.fontfamily {
font-family: "Avenir Next Light";
}
h3{
color:grey;
}
.margin5 {
margin-left: 5%;
margin-right: 5%;
}
.margin15 {
margin-left: 15%;
}
.margin6{
margin-left: 6%;
}
.margin10 {
margin-left: 10%;
}
.margin50{
margin-left:50%;
}
.absPosition{
position: absolute;
}
.floatLeft{
float:left;
}
.shadow {
box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.4);
}
.opacity{
opacity: 0.3;
filter: alpha(opacity=30);
}
#dvNavigationArea ul li {
display: inline;
padding-right:20px;
width:100px;
position:relative;
}
.underline{
content:'';
height: 0;
left:0;
bottom:0px;
border-bottom: 4px solid #53ADB3;
}
/*for css chart control*/
.container {
width: 100px;
margin: 20px;
background: #fff;
padding: 20px;
float: left;
}
.horizontal .progress-bar {
height: 45px;
width: 100%;
padding: 12px 0;
}
.horizontal .progress-track {
width: 100%;
height: 20px;
background: #ebebeb;
}
.horizontal .progress-fill {
background: #666;
height: 20px;
width: 50%;
color: #fff;
text-align: center;
font-size: 12px;
line-height: 20px;
}
.fontColor{
color:#53ADB3;
}
.fontsizexlarge{
font-size: x-large;
}
.fontsizexxlarge{
font-size: xx-large;
}
.fontsize22{
font-size: larger;
}
.fontsize10{
font-size: large;
}
.icon110
{
background-color:#secondary;
-moz-border-radius:50%;
-webkit-border-radius:50%;
border-radius: 50%;
width:#col-size;height:#col-size;
}
.textaligncenter{
text-align:center;
}
.minwidth
{
}
You did the typo while assigning the class for the last div. Use floatLeft instead of floatleft (the letter l is culprit)
Js Fiddle
Your last div class name should be floatLeft instead of flaotleft.
<div id="imgStress" class="floatLeft">
Fiddle
* add this code *
.floatleft{
float: left;
text-align: center;}
http://jsfiddle.net/80sems56/3/
Your HTML has a mistake in. Your missing a capital 'L' on the floatLeft class.
Updated Fiddle
<div>
<div id="imgWeight" class="floatLeft">
<img alt="Body Weight" class="icon110" src="../../images/OnTrack/bmi_icon_100.png"/>
<div class="textaligncenter">Body Weight</div>
</div>
<div id="imgBloodPressure" class="margin5 floatLeft">
<img alt="Blood Pressure" class="icon110" src="../../images/OnTrack/health_manager_icon_100.png"/>
<div class="textaligncenter">Blood Pressure</div>
</div>
<div id="imgStress" class="floatLeft">
<img alt="Stress" class="icon110" src="../../images/OnTrack/stress_icon_100.png"/>
<div class="textaligncenter">Stress</div>
</div>
</div>

Text not adjusting on a single line

The problem that i am facing is that text inside the a tag is not adjusting on a single line.
Here's my html.
<html>
<head>
<link rel="stylesheet" href="style5.css" type="text/css">
</head>
<body>
<div id="outer">
<ul>
<li class="current">Home</li>
<li>content</li>
<li>search</li>
<li>more</li>
</ul>
<div id="homepage">
Set as Homepage
</div>
<div id="clear">
</div>
</div>
<div id="wrapper">
<div id="pic">
<img src="logo.png">
<div id="content">
<p> Secure Search </p>
</div>
</div>
<div id="forms">
<form>
<input type="text" name="submit" size="70" style="font-size:20pt;"/>
</form>
<div id="pic_2">
<img src="powerd-by-google.png">
</div>
</div>
<div id="footer">
© 2012 - We Respect your Privacy - About AVG Secure Search
</div>
</div>
</body>
</html>
and here's my css.
body
{
margin: 0;
padding: 0;
background-color: white;
}
h1,h2,h3
{
margin: 0;
padding: 0;
}
p,ul,ol,li
{
margin: 0;
padding: 0;
}
#outer
{
background-color: rgb(67,68,71);
}
#outer ul
{
list-style: none;
margin-left: 5px;
border-left: 1px solid;
}
#outer li
{
float: left;
}
.current
{
background-color: rgb(56,63,137);
}
#outer a
{
width: 90px;
display: block;
text-transform: uppercase;
text-decoration: none;
text-align: center;
font-weight: bold;
color: white;
border-right: 1px solid;
padding: 5px;
}
#outer a:hover
{
color: black;
background-color: white;
}
#outer .current a:hover
{
color: white;
background-color: inherit;
}
#homepage a
{
float: right;
font-weight: none;
color: white;
background-color: rgb(67,68,71);
display: inline;
text-transform: lowercase;
border-right: none;
}
#homepage a:hover
{
color: white;
background-color: inherit;
}
#clear
{
clear: both;
}
#wrapper
{
width: 960px;
margin: 0 auto;
overflow: auto;
}
#pic
{
margin-top: 100px;
margin-left: 389px;
position: relative;
}
#content
{
position: absolute;
top: 60px;
left: 90px;
}
#forms
{
margin-top: 50px;
position: relative;
}
#pic_2
{
position: absolute;
top: 0px;
left: 867px;
}
#footer
{
width: 500px;
margin: 375px auto 0px;
}
#footer a
{
text-decoration: none;
}
now the problem is with the a tag in the homepage div, i have tried very hard but i have no idea why its text is not adjusting on a single line instead it seems to creep up on multiple lines.
Any suggestions in this matter would be really helpful.
thank you.
I'm assuming you're talking about the 'set as homepage' button.
If so, The issue is that your css is writing a fixed with to the element inherited from #outer a which is making that element 90px wide.
You can fix this by simply adding the css style width: inherit; to #homepage a
Example:
http://jsfiddle.net/2jByx/1/
You need to add width to the "set as homepage" element
#homepage a {
.....
width: 120px; //added width
}
Take a look at here, http://jsfiddle.net/VkmHr/
is that you looking for?