I am trying to get my "more" links to all line up straight. I was wondering if I should make a separate div for them? Otherwise I don't really know what to do. I'm new at this so do not judge too harshly. Thank You! I added a jsfiddle but I know that I didn't properly do it...I hope you can just look at the code though. I'll add a picture of what I'm having problems with: https://jsfiddle.net/uxnLsxxk/
<div class="box1">
<div class="column-left">
<h2> Content</h2>
You can use good'old tables too
<table width="100%">
<tr>
<td>
<table width="100%">
<tr>
<td>
<h2> Content</h2>
</td>
</tr>
<tr>
<td>
<p>GCOM 366 is designed to teach intermediate web design. Building on the beginning
skills you’ve mastered in GCOM266, you will learn the current development tools
commonly used in front end web development. Subjects will include web hosting,
text editors such as the Atom, HTML, CSS, jQuery, Responsive Design, and UI/UX,
and Forms. You will learn through lectures, demonstrations, reading assignments,
and hands-on experiences. We will be working with a variety of materials, typically in a teaching presentation and assignments, with listed resources</p>
</td>
</tr>
<tr>
<td>
<a id="button1" href="about.css">More</a>
</td>
</tr>
</table>
</td>
<td>
<table width="100%">
<tr>
<td>
<h2> Objectives</h2>
</td>
</tr>
<tr>
<td>
<p>GCOM 366 is designed to teach intermediate web design. Building on the beginning
skills you’ve mastered in GCOM266, you will learn the current development tools
commonly used in front end web development. Subjects will include web hosting,
text editors such as the Atom, HTML, CSS, jQuery, Responsive Design, and UI/UX,
and Forms. You will learn through lectures, demonstrations, reading assignments,
and hands-on experiences. We will be working with a variety of materials, typically in a teaching presentation and assignments, with listed resources</p>
</td>
</tr>
<tr>
<td>
<a id="button1" href="about.css">More</a>
</td>
</tr>
</table>
</td>
<td>
<table width="100%">
<tr>
<td>
<h2> Project</h2>
</td>
</tr>
<tr>
<td>
<p>GCOM 366 is designed to teach intermediate web design. Building on the beginning
skills you’ve mastered in GCOM266, you will learn the current development tools
commonly used in front end web development. Subjects will include web hosting,
text editors such as the Atom, HTML, CSS, jQuery, Responsive Design, and UI/UX,
and Forms. You will learn through lectures, demonstrations, reading assignments,
and hands-on experiences. We will be working with a variety of materials, typically in a teaching presentation and assignments, with listed resources</p>
</td>
</tr>
<tr>
<td>
<a id="button1" href="about.css">More</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
Check the output in Jsbin
#media only screen and (min-width: 961px) {
/*-----CONTENT -----*/
figure.adjustable {
width: 29%;
}
html {
position: relative;
min-height: 100%;
}
body {
margin: 0 0 100px; /* bottom = footer height */
font-family: 'Arapey', serif;
/*font-family: 'Courier New', sans-serif;*/
font-weight: 300;
font-size: 20px;
}
header {
position: fixed;
z-index: 1000;
width: 100%;
top: 0px;
text: black;
background-color:#670809;
height:70px;
text-align: center;
letter-spacing:1px;
line-height: 55px;
}
header, h1, h2{
font-family: 'Yatra One', cursive;
}
nav ul li a {
display:inline-block;
text-align: center;
padding: 1 px;
color: #fff;
letter-spacing: 1 px;
text-decoration:none;
text-transform: uppercase;
margin: .55em;
font-size: 5 px;
float: right;
}
nav ul li.active a {
/*background-color: none;*/
color: white;
}
nav ul li a:hover {
/*background-color:none;*/
color: white;
}
nav ul li a:visited {
color:white;
}
/* header tags */
h1 {
text-align: center;
color:#013397;
font-size: 40px;
margin: 5px;
}
h2{
text-align: center;
color:#670809;
font-size: 30px;
margin: 5px;
}
p{
text-align: center;
}
.column-left{
float: left;
width: 30%;
padding: 1%;
}
.column-right{
float: right;
width: 30%;
padding: 1%;
}
.column-center{
display: inline-block;
width: 30%;
padding: 1%;
}
section{
text-align: center;
width: 100%;
}
footer {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
margin: 0;
height: 50px;
background-color:#670809;
font-family: 'Yatra One', cursive;
/* text */
padding-left: 10px;
padding-top: 10px;
color: #ffffff;
font-size: 15px;
text-align:center;
}
a { color: white; }
a, a:hover, a:active, a:visited { color: white; }
.box1{
border-width:thick;
border-style:solid;
border-color:#287EC7;
}
#button1{
color:black;
float: left;
width: 30%;
padding: 1%;
font-weight:bold;
}
#button2{
color:black;
display: inline-block;
width: 30%;
padding: 1%;
font-weight:bold;
}
#button3{
float: right;
width: 30%;
padding: 1%;
color:black;
font-weight:bold;
}
.more{
position:relative;
left:-120px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<header>
Home
About
Contact
MSUM
</header>
<div id="content">
<!--msum logo-->
<figure class="stayssame">
<video controls loop poster="placeholder.png" autoplay>
<source src="video.mp4" type="video/mp4">
<!-- <source src="movie.ogg" type="video/ogg">-->
Your browser does not support the video tag.
</video>
</figure>
<object type="image/svg+xml" data="newsvg.svg" ></object>
<div class="video-txt" ></div>
<section>
<section>
<h1> GCOM 366 Overview</h1>
<div class="box1">
<div class="column-left">
<h2> Content</h2>
<img class="img" src="techpic4.jpg" alt="example web page" width="200" height="200" />
<p>GCOM 366 is designed to teach intermediate web design. Building on the beginning
skills you’ve mastered in GCOM266, you will learn the current development tools
commonly used in front end web development. Subjects will include web hosting,
text editors such as the Atom, HTML, CSS, jQuery, Responsive Design, and UI/UX,
and Forms. You will learn through lectures, demonstrations, reading assignments,
and hands-on experiences. We will be working with a variety of materials, typically in a teaching presentation and assignments, with listed resources.
<br>
<!-- <a id="button1" href="about.css">More</a>-->
</p>
</div>
<br>
<div class="column-center">
<h2>Objectives</h2>
<img class="img" src="techpic1.jpg" alt="html code" width="200" height="200" />
<p>Upon successful completion of the course the student will:
1) Demonstrate competency in the following computer software applications or
practices;
a. HyperText Markup Language (HTML5)
b. Cascading Style Sheets (CSS3)
c. Photoshop
d. IFirefox, Chrome, Safari, IE
e. FTP clients (Fetch, Filezilla, etc.)
2. Design web pages of various complexities.
3. Understand terminology used in web publishing.
4. Discuss the importance of graphic applications and their relationship to the graph
-
ic communications industry.
<br>
<!--<a id="button2" href="contact.css">More</a>-->
</p>
</div>
<div class="column-right">
<h2> Project</h2>
<img class="img" src="techpic2.jpg" alt="keyboard" width="200" height="200" />
<p>The course centers around weekly projects that will feed into the development of a
final project. A website must a have a clear purpose and established brand students will develop their plan for this, and execute it with skills learned in the class.
The website must be well organized, competitively designed, and skillfully coded
<br>
<a id="button3" href="msum.css" class="more">More</a>
</p>
</div>
</section>
</div>
<footer>
</footer>
</body></html>
</body>
</html>
This code should do it.
HTML
<div class="text-container">
<p class="overview-text">
... your text ...
</p>
<div class="more-link">
More
</div>
</div>
CSS
.overview-text, .more-link {
text-align: center;
}
Place the HTML after the img tags.
Set min-height for overview-text class. And i hope it will fix your issue. for example
CSS:
.overview-text{
min-height: 200px
}
Related
i am really new to css and html coding and my mission right now is to recreate a website design, the website i have to recreate (first page only) is https://smashingconf.com/sf-2020 The part i am currently have problem with is at the part that talks about "What’s Smashing Conference Like?"
There is a white line in between the headline and text. https://gyazo.com/7dc51e0ff16fa6552b1e37ddb095155b
i am having trouble removing it, coloring the section wont work, because for some reason only the headline is in the secion. When i inspected the source code of original page, the headline is in a different div from others, so that is how i am planning on doing it too. Would like some assistance if possible.
<section class="section2">
<div class="like">
<h1>What’s Smashing Conference Like?</h1>
</div>
<div class="firstBlock">
<div class="left">
<p>
<em>SmashingConf</em>
is a friendly, inclusive event which is focused on real-world problems and solutions.
<strong>
<span class="small-caps">2</span>
days,
<span class="small-caps">1</span>
track
</strong>
,
<span class="small-caps">14</span>
speakers,
<span class="small-caps">300</span>
-
<span class="small-caps">400</span>
attendees and bunch of hands-on workshops.
</p>
<p>
Our speakers rarely show slides: they show
<em>how they work</em>
- their setupo, techniques and shortcuts for getting work done in
<strong>live interactive sessions</strong>
. So expect everything from refactoring and debugging to sketching and redisgn,
<em>live</em>
.
</p>
<p>
<em>SmashingConf</em> is focused on <strong>front-end and UX</strong>, but it covers everything web, be
it interface design or machine learning. That means a <em>packed</em> bundle of diverse, actionable
insights for your work.
</p>
<p>What’s the atmosphere like? Well, take a look at the <a href="https://vimeo.com/227793688">conference
showreel</a>, videos from previous events, and
photos.</p>
</div>
<div class="right">
</div>
</div>
</section>
And the css part
.section2{
color: white;
background-color: rgb(9, 42, 53);
}
.like{
background-color: rgb(9, 42, 53);
color: white;
}
.firstblock{
background-color: rgb(9, 42, 53);
}
.speakers{
padding-top: calc(1.5em +3 vh) 3.75em;
padding-left: 3.75em;
padding-right: 3.75em;
padding-bottom: calc(1.5em + 3vh);
}
.left{
padding-left: 20.8px;
padding-right: 20.8px;
line-height: 35.36px;
width: 50%;
height: auto;
float: left;
background-color: rgb(9, 42, 53);
}
I just found out inspecting my own page created so far, i have a main div that takes the first section in it with it's css and all, however it takes only up to the H1 the div with information is not included in it.
FULL CODE Sorry for it being so messy
HTML
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="style.css">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<title>SmashingConf SF 2020 (November 10–11) — Friendly, inclusive, practical event
for web designers and developers. - SmashingConf SF 2020, November 10—11 </title>
<!--copied from website -->
</head>
<body>
<div class="main">
<div class="background">
<picture>
<img
src="https://d33wubrfki0l68.cloudfront.net/c1c98ee82fdf48d7336ff0e81fb58edce8f6ab3c/8ceaa/images/logo/logo.svg"
class="picture1" alt="First picture">
<img
src="https://d33wubrfki0l68.cloudfront.net/01d39b8f9052067758bba263382663824b716604/80124/images/events/nav/online-workshops.svg"
class="picture2" alt="Secound picture">
<img
src="https://d33wubrfki0l68.cloudfront.net/122011923c166667a82e110879cb68c36efbb1db/35e97/images/events/nav/freiburg-2020.svg"
class="picture2" alt="Secound picture">
<img
src="https://d33wubrfki0l68.cloudfront.net/2ab6033bf90bcab710c1c4b4dc86a3389b369e80/341c5/images/events/nav/austin-2020.svg"
class="picture2" alt="Secound picture">
<img
src="https://d33wubrfki0l68.cloudfront.net/415d6bcc50d0ff005936651006cad3862dfa13bf/096b1/images/events/nav/ny-2020.svg"
class="picture2" alt="Secound picture">
<img
src="https://d33wubrfki0l68.cloudfront.net/0938f079770a465a5c01fcf9f826b9d0123ee149/fc3dc/images/events/nav/sf-2020-rescheduled.svg"
class="picture2" alt="Secound picture">
</picture>
<nav class="m" role="navigation">
<ul>
<li><a class="active" href="/sf-2020">Home</a></li>
<li>Speakers</li>
<li>Schedule</li>
<li>Workshops</li>
<li>Locations</li>
<li>Partners</li>
<li><strong>Tickets</strong></li>
</ul>
</nav>
<section class="section1">
<div class="apology">
<table>
<tr>
<td>
<p>Unfortunately, due to recommendations from the SF Mayor's office restricting group size, and with
countless
travel bans in place affecting speakers, attendees, and team members, we cannot give you the
conference
experience you expect and deserve. For these, and many more reasons, <b>SmashingConf SF (April 21–22)
is
re-scheduled for November 10–11, 2020.</b></p>
</td>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/83ed4a85d70130df5dcbcb93a5370118f898d495/7fa75/images/helpers/sad-cat.svg"
class="picture3" alt="third picture"></td>
</tr>
</table>
</div>
<div class="information">
<table>
<tr>
<td>
<p>
For SmashingConf SF <span class="small-caps">2020</span>
,<b>November 10–11</b>, we’re bringing back two full days packed with front-end, UX
and all that jazz! Live sessions on <b>performance</b>
, accessibility, interface design, copywriting, designing
for emotion, debugging and fancy CSS/JS techniques — and a few surprises along the way. 🎸
</p>
<p>
Feel excited to join, but you think your manager could need just a little bit more persuasion? We’ve
prepared a neat visual Convince Your Boss PDF and a Letter For The Boss Template. Good luck!
🤞🤞🏼🤞🏾
</p>
</td>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/0938f079770a465a5c01fcf9f826b9d0123ee149/fc3dc/images/events/nav/sf-2020-rescheduled.svg"
class="picture4" alt="fourth picture"></td>
</tr>
</div>
<div class="speakers">
<table>
<h2 style="color: blue;">Our Smashing Speakers</h2>
<tr>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/ed619878a72d086fef28c393fcbef985d9f0225b/9a9ff/images/speakers/chris-coyier.jpg"
class="Personas" alt="fourth picture"></td>
</td>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/eb8f2292998adc841060f9139bcc05f14cae15ba/2afd6/images/speakers/whitney-homans.jpg"
class="Personas" alt="fourth picture"></td>
</td>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/1267e40e21e92b8950fc41ef9c173d37b5e72c16/77ec1/images/speakers/phil-hawksworth.jpg"
class="Personas" alt="fourth picture"></td>
</td>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/3c8cc2c2d722d693cb3df63f67053fe8390fc7f8/f9b1f/images/speakers/eva-ferreira.jpg"
class="Personas" alt="fourth picture"></td>
</td>
<tr>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/346eb539774acb2594af41b257203d1a292e5e16/2d5d4/images/speakers/aarron-walter.jpg"
class="Personas" alt="fourth picture"></td>
</td>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/9d5e8ffda6f4086cb4825d019a78389447a479d1/fa9dc/images/speakers/cassidy-williams.jpg"
class="Personas" alt="fourth picture"></td>
</td>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/daf5eceae9b67999b3228bc90df96803833b8ab3/942f0/images/speakers/kevin-powell.jpg"
class="Personas" alt="fourth picture"></td>
</td>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/dbd2e283f704c650eb82a2af2da08b42a0d1ea10/b1ca8/images/speakers/nathan-curtis.jpg"
class="Personas" alt="fourth picture"></td>
</td>
</tr>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/1c07d8442f6052a2f2876fff0f029bb8be665169/e41dc/images/speakers/monica-dinculescu.jpg"
class="Personas" alt="fourth picture"></td>
</td>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/126e971632c807a1510e4479322582aa66a486c4/3b08f/images/speakers/graham-mcdonnell.jpg"
class="Personas" alt="fourth picture"></td>
</td>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/ea54f2099057a3630c639bafabc1ec3857eb9fe5/e4264/images/speakers/sara-soueidan.jpg"
class="Personas" alt="fourth picture"></td>
</td>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/c69cefb0d82b404d27b737e2be6c160238abf755/12ac7/images/speakers/marc-edwards.jpg"
class="Personas" alt="fourth picture"></td>
</td>
</tr>
<td><img
src="https://d33wubrfki0l68.cloudfront.net/47c04c1ce46b5066610cbc9ccfaf8066728b263f/c697e/images/speakers/mystery-sf-2019.png"
class="Personas" alt="fourth picture"></td>
</td>
</table>
</div>
</section>
<section class="section2">
<div class="like">
<h1>What’s Smashing Conference Like?</h1>
</div>
<div class="firstBlock">
<div class="left">
<p>
<em>SmashingConf</em>
is a friendly, inclusive event which is focused on real-world problems and solutions.
<strong>
<span class="small-caps">2</span>
days,
<span class="small-caps">1</span>
track
</strong>
,
<span class="small-caps">14</span>
speakers,
<span class="small-caps">300</span>
-
<span class="small-caps">400</span>
attendees and bunch of hands-on workshops.
</p>
<p>
Our speakers rarely show slides: they show
<em>how they work</em>
- their setupo, techniques and shortcuts for getting work done in
<strong>live interactive sessions</strong>
. So expect everything from refactoring and debugging to sketching and redisgn,
<em>live</em>
.
</p>
<p>
<em>SmashingConf</em> is focused on <strong>front-end and UX</strong>, but it covers everything web, be
it interface design or machine learning. That means a <em>packed</em> bundle of diverse, actionable
insights for your work.
</p>
<p>What’s the atmosphere like? Well, take a look at the <a href="https://vimeo.com/227793688">conference
showreel</a>, videos from previous events, and
photos.</p>
</div>
<div class="right">
</div>
</div>
</section>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
crossorigin="anonymous"></script>
</body>
</html>
css
.picture1{
width: 195px;
height: auto;
}
.picture2{
width: 132px;
height: auto;
border-radius: 11px;
}
.picture3{
width: 176px;
height: 233;
}
.picture4{
width: 350px;
height: 343;
}
img{
outline: 0;
border-radius: 11px;
}
.body{
line-height: 170%;
font-size: calc(1em+ .25vw);
}
.main{
font-size: 100%;
font-family: "Elena",-apple-system,BlinkMacSystemFont,AvenirNext,Avenir,Roboto Slab,"Droid Serif",Segoe UI,Georgia,Times New Roman,serif;
vertical-align: baseline;
background-color: rgba(0, 0, 0, 0);
}
.background{
margin: 0, auto;
margin-top: 0px;
margin-left: 234.078px;
margin-bottom: 0px;
margin-right: 234.078px;
}
.section1{
border-bottom-color: rgb(255, 255, 255);
border-bottom-style: solid;
border-bottom-width: 1px;
color: rgb(51, 51, 51);
line-height: 33.1245px;
padding-left: 73.0688px;
padding-right: 73.0688px;
}
.apology{
margin-bottom: 3rem;
line-height: 1.6em;
float: right;
}
.small-caps {
font-feature-settings: "smcp" 1,"c2sc" 1,"c2sc","c2sc","c2sc";
letter-spacing: 1px;
font-variant: small-caps;
text-transform: lowercase;
}
nav{
float: middle;
}
nav li{
float:left;
}
nav ul{
list-style: none;
}
.active{
background-color: #dbebf7;
}
.topnav a {
float: left;
color: #0168b8;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: #ddd;
color: rgb(2, 6, 252);
}
.m {
background-color: rgba(0, 0, 0, 0);
background-clip: border-box;
font-size: 19.485px;
font-style: normal;
margin-top: 19.485px;
vertical-align: center;
padding-left: 73.0688px;
padding-right: 73.0688px;
padding-inline-start: 73.0;
}
.m ul{
grid-template-columns: 1fr 1fr 1fr;
}
.Personas {
transition: transform .25s ease-in-out,-webkit-transform .25s ease-in-out;
border-radius: 50%;
transform: rotate(-11deg);
width: 180px;
height: 180px;
}
.Personas:hover {
-webkit-transform: rotate(11deg);
transform: rotate(11deg);
}
h1.section2{
color: white;
background-color: rgb(9, 42, 53);
}
.like{
background-color: rgb(9, 42, 53);
color: white;
margin-bottom: 0px;
}
.firstblock{
color:white;
background-color: rgb(9, 42, 53);
}
.speakers{
padding-top: calc(1.5em +3 vh) 3.75em;
padding-left: 3.75em;
padding-right: 3.75em;
padding-bottom: calc(1.5em + 3vh);
}
.left{
padding-left: 20.8px;
padding-right: 20.8px;
line-height: 35.36px;
width: 50%;
height: auto;
float: left;
background-color: rgb(9, 42, 53);
color:white;
}
Hopefully that will give more understanding of what i have created so far.
H1 has default margins you'll have to override with CSS. That's probably causing the space.
body {
margin: 0px;
background-color: rgba(195, 246, 255, 0.48);
}
.nav {
background-color: rgba(190, 190, 190, 0.72);
position: fixed;
top: 0px;
right: 0px;
left: 0px;
text-align: center;
height: 85px;
border: 1px solid black;
}
ul {
position: relative;
top: 6px;
left: 360px;
width: 450px;
height: 60px;
margin: 0px auto;
font-family: "Cairo";
padding: 5px;
}
li {
position: relative;
top: 6px;
display: inline;
font-size: 25px;
text-transform: uppercase;
letter-spacing: .03em;
}
li.spacing1 {
margin-right: 25px;
}
li.spacing2 {
margin-left: 25px;
}
li:hover {
border: 1px solid red;
padding: 5px;
}
.content {
background-color: white;
width: 1100px;
margin: 87px auto 0px auto;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="../css/example.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Cairo" rel="stylesheet">
<title>My Portfolio</title>
</head>
<body>
<div class="nav">
<ul>
<li class="spacing1">About</li>
<li>Portfolio</li>
<li class="spacing2">Contact</li>
</ul>
</div>
<div class="content">
<p id="about">My name is Lawrence Yoon and I graduated from Cal Poly Pomona with a degree in Hospitality Management and minor in Business Marketing. After working in the hospitality industry for 5+ years, I wanted to expand my knowledge by trying out different
career paths and happened to find out about computer programming. I've been self-learning for 3+ months, and hope to become a front-end web developer soon! I am proficient with HTML and CSS, and have some knowledge of JavaScript. Once I get my first
job, I hope to continue studying and eventually learn back-end. My goal is to one day become a full-stack developer!</p>
<p>So far, I have knowledge of HTML, CSS, Bootstrap, JavaScript, and jQuery. I have used StackOverflow a couple times, and although I don't rely on this, it's great to ask questions and receive answers promptly from a loving community. Jon Duckett's
Introduction to HTML and CSS has been a great teacher to me thus far; although it's a bit dated, it contains detailed images and helped me greatly step foot into the world of web development. Following this book, I got his second book for JavaScript
and jQuery and have started to read through that. While I'm doing this, I'm learning from FreeCodeCamp, which immensely helped because through their projects, I'm able to make this file on Codepen, which will become my portfolio! I will definitely
try to finish all FCC challenges, and make a couple of apps to showcase my skills!</p>
<p>As of right now, I'm not looking for a job because I lack the skills necessary to get my first job in web development. In a couple of months, I hope to polish what I know so far as well as learn new skills to get my first job. In time, I will showcase
my skills by demonstrating my abilities through the makings of small apps. Thanks for reading! Please don't hesitate to reach out to me to provide tips, or if you want to talk about anything I'm all ears!</p>
<p id="portfolio">Portfolio:</p>
<img src="http://res.cloudinary.com/lyoon/image/upload/v1503300012/06_10_16_buqi65.jpg" alt="Beautiful sunset in Redondo Beach" width="300" height="300">
<img src="http://res.cloudinary.com/lyoon/image/upload/v1503299864/01_30_16_2_d1ntei.jpg" alt="Gray day in Redondo Beach" width="300" height="300">
<img src="http://res.cloudinary.com/lyoon/image/upload/v1503299922/02_01_16_wbmyow.jpg" alt="Water in Redondo Beach" width="300" height="300">
<img src="http://res.cloudinary.com/lyoon/image/upload/v1503300012/06_10_16_buqi65.jpg" alt="Beautiful sunset" width="300" height="300">
<p>Contact me here:</p>
<input type="text">
<br>
<input type="text">
<br>
<input type="text">
<br>
<input type="submit" value="Send">
<p id="contact">Here's where you can get in touch with me! Here, you can request for my resume, get more details on my experience, or learn more about my favorite hobbies! I will reply as soon as I am able, thanks!
</div>
</body>
</html>
Two questions:
I have my position: fixed nav-bar that is blocking my anchor tags (about, portfolio, contact), meaning when I click them, it takes me to their location but the nav-bar is blocking the start. When I click the links on the top, how can I make it so that it starts below my nav-bar?
I am using CSS li:visited {text-decoration: none;} but it changes to color purple and still have an underline. Why is that happening?
To resolve the issue with in-page anchors and a fixed header, what you need to do is to create and relatively position an anchor element above the content section.
Fiddle example: https://jsbin.com/dosalajotu/edit?html,css,output
For example, if your header was 50px tall:
header { height: 50px; }
.anchor { position: relative; top: -50px; }
<section>
<div id="about" class="anchor"></div>
</section>
With the :visited state, this would apply to a elements, not to li elements. If you update your CSS selector and also override the colour, that should resolve the issue.
li a:active, li a:visited { color: red; text-decoration: none; }
I am trying to create a website where there are four titles above four images and four descriptions below. For both the titles and descriptions, I have used/created two different tables. The images are placed accordingly using margins. The tables look good on my computer but when transferred to a larger screen they move to the left. I figured out that the way to make them compatable and look good on all larger screens would be to centre the tables. I have tried using align: centre for the table and including style="text-align: centre;" but neither have worked. How can I fix this problem. Thanks for any help in advance. It is greatly appreciated. Below is my current code:
.mobile_title {
margin-top: 25px;
font-size: 25px;
color: black;
margin-left: 105px;
font-family: 'Oswald', sans-serif;
}
.text_under {
font-size: 15px;
color: grey;
font-family: 'Oswald', sans-serif;
width: 150;
text-align: center;
}
.mobile {
margin-top: 30px;
margin-left: 160px;
}
.laptop {
margin-left: 140px;
margin-top: 45px;
}
.coding {
margin-left: 155px;
margin-top: 45px;
}
.database {
margin-left: 150px;
margin-top: 45px;
}
.load {
border-collapse: separate;
border-spacing: 130px 10px;
}
.kbg {
border-collapse: separate;
border-spacing: 155px 10px;
}
<body>
<table class="load">
<tr>
<td class="mobile_title">Mobile Development</td>
<td class="mobile_title">Web Development</td>
<td class="mobile_title">Backend Development</td>
<td class="mobile_title">Database Creation</td>
</tr>
</table>
<img src="mobile.png" width=160 height=120 class="mobile">
<img src="laptop.png" width=150 height=100 class="laptop">
<img src="coding.png" width=150 height=100 class="coding">
<img src="database.png" width=150 height=110 class="database">
<table class="kbg">
<tr>
<td class="text_under">The creation of applications for iOS and Android devices. This also includes the mobile optimization of websites, making them responsive on all devices.</td>
<td class="text_under">The creation of web-based sites using multiple programming languages including HTML, CSS, and Custom word press. These websites, after the creation stages, are hosted online for all to observe.</td>
<td class="text_under">The process and supporting information that websites need in order to perform wanted tasks. The information is written in codes, the process called programming.</td>
<td class="text_under">The location of storage of all of the supporting information. This also saves all important files including the back ends of developing websites and/or mobile applications.</td>
</tr>
</table>
</body>
as per my comment, using flexbox it is easier than tables.
.load-wrap {
display: flex;
flex-wrap: wrap;
text-align: center;
font-family: 'Oswald', sans-serif;
/*to center - optional */
width: 75%;
margin: auto
}
.load {
flex: 1;
padding: 20px;
box-sizing:border-box
}
.mobile_title {
margin-top: 25px;
font-size: 25px;
color: black;
}
.text_under {
font-size: 15px;
color: grey;
}
.mobile {
margin-top: 30px;
}
<div class="load-wrap">
<div class="load">
<div class="mobile_title">Mobile Development</div>
<img src="//placehold.it/160x120" class="mobile">
<div class="text_under">The creation of applications for iOS and Android devices. This also includes the mobile optimization of websites, making them responsive on all devices.
</div>
</div>
<div class="load">
<div class="mobile_title">Mobile Development</div>
<img src="//placehold.it/160x120" class="mobile">
<div class="text_under">The creation of applications for iOS and Android devices. This also includes the mobile optimization of websites, making them responsive on all devices.
</div>
</div>
<div class="load">
<div class="mobile_title">Mobile Development</div>
<img src="//placehold.it/160x120" class="mobile">
<div class="text_under">The creation of applications for iOS and Android devices. This also includes the mobile optimization of websites, making them responsive on all devices.
</div>
</div>
<div class="load">
<div class="mobile_title">Mobile Development</div>
<img src="//placehold.it/160x120" class="mobile">
<div class="text_under">The creation of applications for iOS and Android devices. This also includes the mobile optimization of websites, making them responsive on all devices.
</div>
</div>
</div>
Put your images in new row with each image in separated column, also do that for description text. And to center images use:
td img{
display: block;
margin-left: auto;
margin-right: auto;
}
For centering text add:
text-align: center;
In your .load class.
Here is your JSFiddle: https://jsfiddle.net/9c1p3fm6/
Edit: And yes, you need to delete all classes you attached to img elements.
Here is the problem: the Whole2 element in the css portion is supposed to be a container for the other divs, but it doesn't create the border or padding around he other elements. If anyone can tell me what I am doing wrong, please do.
By the way, the content is nonsense, ignore it.
This is my css:
<style>
.Whole2{
border:4px solid black;
padding: 1em;
}
.Title{
border: 1px solid;
background: lightblue;
text-align: right;
width: 57.9em;
height: 8em;
padding: .5em;
}
.Subtitle {
font-size: 0.8em;
}
.Blog1 {
width: 44em;
height: 20em;
border:1px solid black;
background: lightgreen;
text-align: justify;
padding: .5em;
}
.Blog2 {
width: 44em;
height: 20em;
border:1px solid black;
background: lightgreen;
text-align: justify;
padding: .5em;
}
.Friends {
border:1px solid black;
background: purple;
width: 12em;
height: 12em;
position: absolute;
top:10em;
left:0.5em;
padding: .5em;
}
.clears{
clear: both;
}
.theImg{
float: right;
padding: .5em;
}
.Blogs{
position: absolute;
top:10em;
left:14.4em;
}
.blogtext{
font-size: 18px;
}
.Whole2 {
border:4px solid black;
padding: 1em;
}
</style>
This is my html:
<!DOCTYPE html>
<html>
<link rel="stylesheet" type="text/css" href="lab1.css">
<div class="Whole2">
<head>
<div Class="Title">
<h1> Title thing </h1>
<div class="Subtitle">
<h2> Subtitle thing </h2>
</div>
</div>
</head>
<h3 class="clears"></h3>
<div class="Friends">
<head>
<h1> Friends</h1>
</head>
<body>
<table>
<th>
Friends
</th>
<tr>
<td>
Leo Bloom
</td>
</tr>
<tr>
<td>
Leo Bloom
</td>
</tr>
<tr>
<td>
Leo Bloom
</td>
</tr>
</table>
</body>
</div>
<h3 class="clears"></h3>
<div class="Blogs">
<div class="Blog1">
<head>
<h1> <span><time>2015-02-11</time></span>: Moose Day</h1>
</head>
<body>
<div class="theImg">
<img src="http://ia.media-imdb.com/images/M/MV5BMjE0ODk2NjczOV5BMl5BanBnXkFtZTYwNDQ0NDg4._V1_SY317_CR4,0,214,317_AL_.jpg" height="200" width="200">
</div>
<h2>
<div class="blogtext">
The moose (North America) or elk (Europe), Alces alces, is the largest extant species in the deer family. Moose are distinguished by the palmate antlers of the males; other members of the family have antlers with a dendritic ("twig-like") configuration. Moose typically inhabit boreal and mixed deciduous forests of the Northern Hemisphere in temperate to subarctic climates. Moose used to have a much wider range but hunting and other human activities greatly reduced it over the years. Moose have been reintroduced to some of their former habitats. Currently, most moose are found in Canada, Alaska, Scandinavia and Russia.
</div>
</h2>
</body>
</div>
<h3 class="clears"></h3>
<div class="Blog2">
<head>
<h1> <span><time>2015-03-11</time></span>: Second Moose Day</h1>
</head>
<body>
<div class="theImg">
<img src="http://ia.media-imdb.com/images/M/MV5BMjE0ODk2NjczOV5BMl5BanBnXkFtZTYwNDQ0NDg4._V1_SY317_CR4,0,214,317_AL_.jpg" height="200" width="200">
</div>
<h2>
<div class="blogtext">
Their diet consists of both terrestrial and aquatic vegetation. The most common moose predators are wolves, bears, and humans. Unlike most other deer species, moose are solitary animals and do not form herds. Although generally slow-moving and sedentary, moose can become aggressive and move surprisingly quickly if angered or startled. Their mating season in the autumn can lead to spectacular fights between males competing for a female.
</div>
</h2>
</body>
</div>
</div>
</div>
</html>
First, put <div class="Whole2"> inside the body.
Second, you only can have one <head> and one <body>. And I think that you are confounding <head> with <header>.
I'm playing around with a header for a site I'm going to make, and I'm trying to use CSS media selectors to change how the header is viewed on mobile phones.
Here is a fiddle of what I'm trying to do:
http://jsfiddle.net/ro7pbdkw/2/
and
Here is the code:
html:
<img src="http://lifetimefoundation.adoptsites.wpengine.com/wp-content/uploads/sites/3/2014/10/LifetimeLogolong.png" alt="LifetimeFoundation" width="311" height="122" class="header-img" align="left" style="margin-right: 10px;"/>
<div class="header" style="background-color:#6b3f24; height:122px; width:960px;" align="center">
<div class="header-text" style="padding-top: 10px; text-align: left;">
<h1>BUILDING FAMILIES AND FUTURES</h1>
<h5>Through Adoption Grants and Educational Scholarships</h5>
</div>
</div>
CSS:
h1 {
font-family: Garamond;
font-size: 200%;
color: #FFFFFF;
margin: 0px;
}
h5 {
font-family: Garamond;
font-size: 100%;
color: #D9825F;
margin: 0px;
}
#media handheld {
.header {
display:none;
}
}
I want the brown box to disappear on a cell phone and just leave the img as a header, however, I haven't been able to get the style selector to actually work properly. Any tips or comments to let me know what I'm doing wrong?
Much appreciated!