Making a footer for a div element - html

so i want to make this footer style :
I tried my best, and i got this :
How can i make it combine like the first picture?
I've tried my best and this is my code so far :
div.code-div{
border:solid 1px #bababa;
border-radius:5px;
padding:5px;
font-family:Code;
font-size:5em;
border-bottom: solid 50px #b0b0b0;
}
div.code-div ::selection{
background-color:#adddff;
}
div.footer{
background:#b0b0b0;
border-top: solid 1px #b0b0b0;
border:solid 1px #b0b0b0;
}
b.footertext{
font-size:20%;
}
a.viewraw{
float:right;
font-size:20%;
}
table.code{
overflow-x:scroll;
display:block;
width:100%
}
td.linenum{
font-family:Code;
float:right;
margin-right:10px;
font-size:10px;
color:#bababa;
user-select: none;
}
td.linecode{
font-family:Code;
font-size:10px;
}
span.builtins.import{
color:#ffa938;
}
<link rel="stylesheet" href="0embed.css">
<div class="code-div">
<div>
<table class="code">
<tr>
<td class="linenum">1</td>
<td class="linecode"><span class="none"><span class="builtins import">import</span> PySimpleGUI <span class="builtins import">as</span> sg</span></td>
</table>
</div>
<div class="footer">
<b class="footertext">Exampletext</b>
<a class="viewraw">view raw</a>
</div>
</div>
The problem is that the text, as in the 2nd picture doesn't combine with the border, how am i supposed to combine them?
I Really Appreciate If You Help!

The problem is that you have padding on your .code-div and the .footer is inside that so won't go all the way to the edges. To make it work how you want, you should remove the padding from .code-div and add it to the .footer.
div.code-div{
border:solid 1px #bababa;
border-radius:5px;
font-family:Code;
font-size:5em;
border-bottom: solid 50px #b0b0b0;
}
div.footer{
background:#b0b0b0;
border-top: solid 1px #b0b0b0;
border:solid 1px #b0b0b0;
padding:5px;
}

Related

CSS triangle has no point

Here is what is happening:
CSS:
.speech-box {
height:76px;
width:220px;
padding:6px 10px;
background-image: linear-gradient(#4f4f4f,#000);
}
.speech-box:before {
content:'';
width: 0;
height: 0;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right:5px solid #4f4f4f;
position:relative;
left:-15px;
top:-3px;
}
And my HTML:
<div class="speech-box">
<span class="speech"></span>
</div>
And here is a fiddle: http://jsfiddle.net/xqy4dLbc/
I'm guessing the problem is with my HTML?
You need to add
display:block;
or
display:inline-block;
to .speech-box:before :
DEMO
The default display property of pseudo-element is inline (see MDN) and you can't set height on inline elements. Therefore the height:0; you set doesn't apply.

How can i get this border to wrap around my div?

Hi guys i would like the border to surround my whole <div id=wedding> but it wont wrap around the image and the text within the <div>. Please help my code is below:
HTML:
<div id="Weddings">
<img src="images/gallery/weddinggh.jpg">
<br>
<a href="gweddings">Click here to check out pictures of
<br> our past wedding cakes<a>
</div>
CSS:
#Weddings {
padding: 2px;
border: 1px solid;
}
#Weddings a:link {
text-decoration:none;
color:black;
font-size:16px;
font-family: "footer";
}
#Weddings img {
width:200px;
height:300px;
}
#Weddings {
padding: 2px;
border: 1px solid;
width:200px;
}
you just need to set a width to your div :)
Here's an example : http://jsfiddle.net/f4t2Z/
You need to define a border color
#Weddings {
padding: 2px;
border: 1px solid red;
}
or whatever.
Have you tried
#Weddings img {
width:200px;
height:300px;
display:block;
}

div how to make customize an item layout

I'm trying to play around with div to get the item layout that I need, but I can't achieve what I'm looking for
.skills-container
{
height:50px; /* something like 50px */
padding:5px;
}
.skill-pic
{
width:48px;
height:48px;
}
.skill-content
{
}
.skill-content p
{
}
.progress
{
}
HTML :
<div class="skills-container">
<div class="skill-pic">
<img src="img/ps.png" alt="Klematis" width="48" height="48">
</div>
<div class="skill-content">
<p>Photoshop</p>
<div class="progress">
<div class="progress-bar progress-success">
</div>
</div>
</div>
</div>
You need to add float: left; to the .skill-pic css.
EDIT: Someone also pointed out this doesn't get exactly what you need. You'll also need to add a border attribute to the css of the elements like so:
border: solid black 1px; and replace the 1px with the size of the border you need... You'll have to play with it.
Try this as your CSS: it should work and you can tweak it as such... Working JSfiddle here:
.skills-container
{
display:inline-block;
border: solid black 4px;
}
.skill-pic
{
margin:2px;
float:left;
width:45px;
height:45px;
}
img
{
border: solid black 3px;
height:45px;
}
.skill-content
{
height:45px;
width:200px;
border: solid black 3px;
float:left;
margin:2px 2px 2px 5px;
}
.skill-content > div
{
margin:2px;
border: solid black 1px;
}
.progress
{
margin:2px;
border: solid black 1px;
}

Positioning text in different CSS shapes

Unfortunately I’m going slightly mad trying to align the “date” numbers over the CSS shapes. The problem I have is I would prefer a “universal” CSS number format for simplicity (the date is a displayed variable with a class applied to the td). I then change the CSS class for the underlying cell shape depending on its state to give it a background. All the PHP works to output the thing but some of the numbers align central to the cell, others are too low in the cell (mid height bottom) and two of them are off the page on at the top.
This is where I am up to (very simplified but illustrates the alignment problem in a table) – JSFiddle http://jsfiddle.net/xLWCH/
.daynumber {font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#000000; font-weight: bold; position:absolute; display: table-cell; width:20px; vertical-align:middle; top:-9px; text-align: center; vertical-align: middle;}
.halfdaystart {position:relative; border-top: 20px solid green; border-right:20px solid red; font-size:0; line-height:0; width:0;}
.halfdayend {position:relative; border-top: 20px solid red; border-right:20px solid green; font-size:0; line-height:0; width:0;}
.booked {width:20px; height:20px; background:red;}
.Prohalfdaystart {position:relative; border-top:20px solid green; border-right:20px solid yellow; font-size:0; line-height:0; width:0;}
.Prohalfdayend {position:relative; border-top: 20px solid yellow; border-right:20px solid green;font-size:0; line-height:0; width:0;}
.Profree {width:20px; height:20px; background:yellow;}
.SBhalfdaystart {position:relative; border-top:20px solid red; border-right:20px solid green; width:0; height:0;}
.SBhalfdaystart:before {content: ''; display:block; position:relative; background:lightblue; height:5px; width:20px; top:-20px;}
.SBhalfdayend {position:relative; border-top:20px solid green; border-right:20px solid red; width:0; height:0;}
.SBhalfdayend:before { content: ''; display:block; position:relative; background:lightblue; height:5px; width:20px; top:-20px;}
.free {position:relative; width:20px; height:20px; background:green;}
.SBfree {position:relative; border-top:20px solid green; border-right:20px solid green; width:0; height:0;}
.SBfree:before { content: ''; display:block; position:absolute; background:lightblue; height:5px; width:20px; top:-20px;}
<table width="20" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Halfdaystart
<div class='halfdaystart'> <!-- or other corresponding class above -->
<table width="100%" cellpadding=0 cellspacing=0 border=0>
<tr>
<td align=center class="daynumber">1</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
What is the best way to do this? Can it be done with a one size fits all CSS or will I have to create a separate class for the text (applied to the td) as well depending on what I want to display as the div class that controls the shape? Basically is there a quick and easy way to do this?

changing color of rounded corners button with CSS

thanks a bunch in advance!
i was able to make a rounded corner button using CSS. i like to be able to mouseover the button, and the entire thing changes its color, not just the inner most div. plz help!
my assumption is that iam supposed to have some kinda javascript with onmouseover="", correct?
here's the page: http://biozenconsulting.com/new/
(also, how do i get rid of the small boxes that appear on the right corners when viewed in IE8 and Chrome?)
this is the HTML code:
<div class="nav_menu" onclick="location.href='index.htm'">
<b class="top_menu"><b class="top_menu1"><b></b></b><b class="top_menu2"><b></b></b><b class="top_menu3"></b><b class="top_menu4"></b><b class="top_menu5"></b></b>
<div class="top_menufg">
<!-- content goes here -->
Home
</div>
<b class="top_menu"><b class="top_menu5"></b><b class="top_menu4"></b><b class="top_menu3"></b><b class="top_menu2"><b></b></b><b class="top_menu1"><b></b></b></b>
</div>
and here's the CSS:
.nav_menu {
text-align: center;
color: #353535;
font-size: 20pt;
font-family: Verdana, Geneva, sans-serif;
float: left;
width: 33%;
}
#about {
margin: 0 .5% 0 .5%;
}
<!-- For rounded boxes -->
.top_menu {
display:block
overflow: hidden;
}
.top_menu *{
display:block;
height:1px;
overflow:hidden;
font-size:.01em;
background:#AAAAAA
}
.top_menu1{
margin-left:3px;
margin-right:3px;
padding-left:1px;
padding-right:1px;
border-left:1px solid #AAAAAA;
border-right:1px solid #AAAAAA;
background:#AAAAAA
}
.top_menu2{
margin-left:1px;
margin-right:1px;
padding-right:1px;
padding-left:1px;
border-left:1px solid #AAAAAA;
border-right:1px solid #AAAAAA;
background:#AAAAAA
}
.top_menu3{
margin-left:1px;
margin-right:1px;
border-left:1px solid #AAAAAA;
border-right:1px solid #AAAAAA;
}
.top_menu4{
border-left:1px solid #AAAAAA;
border-right:1px solid #AAAAAA
}
.top_menu5{
border-left:1px solid #AAAAAA;
border-right:1px solid #AAAAAA
}
.top_menufg{
background:#AAAAAA
}
.top_menufg:hover{
background-color: #888888;
cursor: pointer;
}
<!-- For rounded boxes -->
Stu Nicholls's site css play has a lot of examples of how to do this without javascript. It's a really excellent resource.
I replaced the outer div with a link and added a little bit of CSS.
HTML
<a class="nav_menu" href="index.htm">
<b class="top_menu"><b class="top_menu1"><b></b></b><b class="top_menu2"><b></b></b><b class="top_menu3"></b><b class="top_menu4"></b><b class="top_menu5"></b></b>
<div class="top_menufg">
<!-- content goes here -->
Home
</div>
<b class="top_menu"><b class="top_menu5"></b><b class="top_menu4"></b><b class="top_menu3"></b><b class="top_menu2"><b></b></b><b class="top_menu1"><b></b></b></b>
</a>
CSS
.nav_menu {
text-align: center;
color: #353535;
font-size: 20pt;
font-family: Verdana, Geneva, sans-serif;
float: left;
width: 33%;
text-decoration: none;
}
/* For rounded boxes */
.top_menu {
display:block
overflow: hidden;
}
.top_menu * {
display:block;
height:1px;
overflow:hidden;
font-size:.01em;
background:#AAAAAA
}
.top_menu1 {
margin-left:3px;
margin-right:3px;
padding-left:1px;
padding-right:1px;
border-left:1px solid #AAAAAA;
border-right:1px solid #AAAAAA;
background:#AAAAAA
}
.top_menu2 {
margin-left:1px;
margin-right:1px;
padding-right:1px;
padding-left:1px;
border-left:1px solid #AAAAAA;
border-right:1px solid #AAAAAA;
background:#AAAAAA
}
.top_menu3 {
margin-left:1px;
margin-right:1px;
border-left:1px solid #AAAAAA;
border-right:1px solid #AAAAAA;
}
.top_menu4 {
border-left:1px solid #AAAAAA;
border-right:1px solid #AAAAAA
}
.top_menu5 {
border-left:1px solid #AAAAAA;
border-right:1px solid #AAAAAA
}
.top_menufg {
background:#AAAAAA
}
a.nav_menu:hover b, a.nav_menu:hover div {
background-color: #888888;
cursor: pointer;
}
/* For rounded boxes */