I'm still in the process of mastering css.
So I've made my portfolio website from scratch. as you scroll you'll see the main content is made up of a two column layout. My columns are fixed, wrapped in a relative div that takes up 100% width. the two fixed divs inside take up 50% width. Then I put content inside of the fixed divs -- like my portfolio.
But sometimes the fixed divs height don't expand to the height of the content within it. Especially when you resize. Why?
Here's a link to my website so you can see what I mean.
http://parkhargravedesigns.com/
if ($(window).width() > 768) {
$('.f, .fixedContainer').css('height', $('.text').height());
$(window).resize(function() {
$('.f, .fixedContainer').css('height', $('.text').height());
});
$('.f2,.fixedContainer2').css('height', $('.text2').height());
$(window).resize(function() {
$('.f2,.fixedContainer2').css('height', $('.text2').height());
});
$('.f3, .fixedContainer3').css('height', $('.text3').height());
$(window).resize(function() {
$('.f3, .fixedContainer3').css('height', $('.text3').height());
});
}
.fixedContainer,
.fixedContainer2,
.fixedContainer3 {
position: relative!important;
width: 100%!important;
}
.headerEle2 {
display: block!important;
}
.f,
.f2,
.f3 {
background-color: #293553;
background-size: cover!important;
width: 50%!important;
position: absolute!important;
top: 0;
left: 0;
color: black;
font-size: 70px;
}
.f2 {
background-color: #e7384c!important;
}
.text,
.text2,
.text3 {
background-color: white!important;
background-size: cover!important;
color: black;
position: absolute!important;
right: 0!important;
top: 0!important;
width: 50%!important;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="fixedContainer">
<div class="f">
<div id="aboutStuff">
<p class="fTitle">
About
</p>
<div class="headerEle2 NavDiv"></div>
</div>
</div>
<div id="profilePic">
<img src="album/profilePic2.png" alt="oops">
</div>
<div class="text">
<h1>I'M A WEB & GRAPHIC DESIGNER FROM B.C, CANADA.</h1>
<p>
A strong interest in art and design was my gateway to the creative industry, which led to taking my first steps in the digital world. During my time at North Island College I fell inlove with web design because it allowed me to express my creativity while
developing the skills necessary to create functionable websites.
</p>
<h1>SERVICES:</h1>
<p>
<b>Website Design and Development Logo Design</b>
</p>
<h1>QUALIFICATIONS:</h1>
<p>
<b>HTML
CSS
JavaScript
JQuery
Illustrator
Photoshop
</b>
</p>
<h1>EDUCATION:</h1>
<p>
<b>Program:</b> Web Design & Interactive Media Certificate
<b>Where:</b> North Island College, Comox Valley, BC In this program I gained skills in HTML,<br> CSS, Javascript, PHP and Adobe CC.
</p>
<h1>DESIGN PROCESS</h1>
<p>
A user-centered mindset and sensitivity for design are <br> key concepts I carry throughout the design process.<br><br> This rough framework outlines my process of<br> developing digital experiences: 1. RESEARCH and gather the present state 2. STRUCTURE
setup and content of the project 3. CONCEPT AND STRATEGY <br> 4. CREATE, evaluate and iterate deliverables like -Site maps -User flow -Sketches and Infographics -Wireframes
</p>
<!--
<img src = "album/homeFixed.png" alt = "oops" id = "text1Logo">
-->
</div>
</div>
Related
Honestly, I probably shouldn't even be writing right now given the fact that I am so heartbroken I just want to curl up in a ball and cry in bed. I have worked so hard SO FLIPPING HARD on my design/build and I was so proud of myself that I have not felt this happy in a long time. However, like reality vs. disney...all happy endings must crash and burn because life is no flipping disney screenplay.
Backstory:
I am a high functioning autistic who grew up in a REALLY flipping bad home. Cared for my mum since I was a child. Dad was an abusive piece of crud. We were really poor so I had to work 3 jobs since I was 8 just to take care of the house, bills, etc. Now mum is recently deceased, I am trying to get my life together and escape my abusive father. I can't afford college (because the "get a scholarship and apply for aid" is a load of cow manure), I can't afford bootcamps, I can't afford a mentor, so I taught myself to code using youtube, google and lots of reading.
After nearly two years of studying, many months of designing, many months of coding, trials and errors and research, I finally finished my portfolio website. I took one look at my masterpiece, bought my domain, and published my work. Right when I thought my life was about to change and that I was ready to apply for new jobs, I saw my beautiful sight that fits so beautifully on my chrome browser via macbook air and I asked myself "is this heaven" God instantly replied back "NO....THIS...IS...SPARTA..." and kicked my happy donkey all the way back to reality. Moral of the story, I am what my mummy called my ex's cooking...trash.
Here's my code please do not roast me like a pig at a nordic pagan festival. I am doing my best (which is clearly not good enough).
-----------------------------------website name------------------------------------------
arthurcurry.co.uk
yes this is my real name, yes I know who my mum named me after, yes I used this and my obsession with fish to create my site. Please do not start with the jokes fam. I have heard it my entire life. If you have no idea what I am speaking of... Congrats, you are the .01% of the world who most likely will not have a go at me because of it.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.pimg1,
.pimg2,
.pimg3 {
position: relative;
opacity: 0.70;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
}
.pimg1 {
min-height: 100%;
}
.pimg2 {
min-height: 400px;
}
.pimg3 {
min-height: 400px;
}
.pimg4 {
background-image: url('image4.jpg');
background-size: cover;
background-repeat: no-repeat;
min-height: 100%;
}
.section {
text-align: center;
padding: 50px 80px;
}
.section-light {
background-color: #f4f4f4;
color: #666;
}
.section-dark {
background-color: #282e34;
color: #ddd;
}
.ptext {
position: absolute;
top: 50%;
width: 100%;
text-align: center;
color: #000;
font-size: 27px;
letter-spacing: 8px;
text-transform: uppercase;
}
.ptext .border {
background-color: #111;
color: #fff;
padding: 20px;
}
.ptext .border.trans {
background-color: transparent;
}
#media(max-width:568px) {
.pimg1,
.pimg2,
.pimg3 {
background-attachment: scroll;
}
}
.info {
position: center;
}
.ptext4 {
position: absolute;
top: 450%;
width: 100%;
text-align: center;
color: #000;
font-size: 27px;
letter-spacing: 3px;
text-transform: uppercase;
}
.ptext4 .border {
background-color: #111;
color: #fff;
padding: 20px;
}
.ptext4 .border.trans {
background-color: transparent;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Arthur Curry</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="pimg1">
<video autoplay muted loop>
<source src="waves1.mp4" type="video/mp4" class="video1">
</video>
<div class="ptext">
<span class="border">
Designer. Developer. Conservationist.
</span>
<p>"What could be greater than a King? A Hero. A King fights for his nation, a hero fights for everyone." <strong> - Mera</strong></p>
</div>
</div>
<section class="section section-light">
<div class="text">
<h2> Who is Arthur Curry? </h2>
<p>
Many know his name but even more do not know who he truly is. Ever since Arthur Curry was a child, he felt himself drawn to the 7 seas and her despair as if she was physically calling to him. With the incapability to escape the grasp of her cries for
help, he knew something must be done. In 2016 he began teaching himself to code using numerous programming languages, text editors, design and developing platforms. Through his work he has made it his life mission to not just design and develop
but to use his skills for good towards conservation. Many have come to him for advice and have called him a living computer, constantly learning, adapting and solving problems many find challenging.
</p>
</div>
</section>
<div class="pimg2">
<video autoplay muted loop>
<source src="pimg2.mp4" type="video/mp4">
</video>
<div class="ptext">
<span class="border trans">
Did you know that in 2020 Ocean Cleanup broke world record using technolgy to collect <strong><i>103 tons of plastic</strong></i>!
</span>
</div>
</div>
<section class="section section-dark">
<h2>Design Tools</h2>
<p>
Pen & Paper, Sketch pad, Webflow, Apple Mac, photography/videography camera, dive gear, Microsoft Office, Adobe Photoshop, Adobe Lightroom, & Adobe Animate.
</p>
</section>
<div class="pimg3">
<video autoplay muted loop>
<source src="pimg3.mp4" type="video/mp4">
</video>
<div class="ptext">
<span class="border trans">
Did you know that because of technology, scientist are using biorock which gives coral reefs a 1600% to 5000% higher chance of survival?
</span>
</div>
</div>
<section class="section section-dark">
<h2>Developer Tools</h2>
<p>
Github, HTML, CSS, PHP, Python, JS, Sublime Text Editor, Visual Code Text Editor, & Bootstrap.
</p>
</section>
<div class="pimg4">
<div class="ptext4">
<span class="border trans">
<ul>
<li>Would you like to know more about becoming a true conservationist?</li>
<br>
<li>(website coming soon)</li>
<br>
<li><strong><i>ACurry.Business#gmail.com</i></strong></li>
</span>
<a href="http://open.spotify.com/user/q77rp6h9ot83qjk8r9xxg63hn" target="_blank">
<img src="spotify.png" class="spotify">
</a>
<a href="https://www.linkedin.com/in/arthurcurry/" target="_blank">
<img src="linkedin.png" class="linkedin">
</a>
<a href="https://www.instagram.com/oceanic_conservationist/" target="_blank">
<img src="instagram.png" class="instagram">
</a>
</div>
</div>
</body>
</html>
There are just way too many things wrong with your website. Furthermore, I am honestly unable to understand your concern here.
If the title is the only concern, it is because you have not made your website responsive.
Use this as a reference.
#media(max-width:568px) {
.pimg1,
.pimg2,
.pimg3 {
background-attachment: scroll;
}
}
That is the only part that aims at responsiveness. You have to aim at every breakpoint possible. It looks different in different browsers and mobile because your website aims at 568px and below. That's close to a phone resolution than a PC resolution (Consider 4k screens as well). Make different breakpoints, use dev tools on chrome and reduce the screen size to see what's out of place, create a media query for that and try fixing it.
Also, try learning flexbox or grid. Does wonders and shouldn't take more than a day.
It takes time to get better and be glad that you started. Nobody builds a perfect website the first time.
Bonus:
.ptext4 {
top: 450%;
Delete "top" to view your footer.
So this may seem confusing and I know a plugin or google maps would be easier but this is what the company is demanding. Their UI/UX guy created the image of a world map (all the continents). They want the map to cover the entire background. Then they have images of the map markers they want placed on top in certain locations. Then you need to be able to hover over each and have a tooltip pop-up. All of that I have working but I cannot figure out how to get each marker to resize with the map image as the screen shrinks.
Here is what they want
I have that working but only on full size heres what happens when the screen resizes
Here is the code I currently have
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
.map {
background-image: var(--boh-map-image),url("/images/map/BOH_map_01.jpg") !important;
background: no-repeat;
background-size: 100%, 100%;
height: 75rem;
}
.marker-pin-midwest {
width: 25px;
height: 35px;
position: absolute;
left: 27.05rem;
top: 197.3rem;
}
.marker-pin-northeast {
width: 25px;
height: 35px;
position: absolute;
left: 33.875rem;
top: 197.6rem;
}
<section class="section-page-content map nomobile">
<div class="container text-center">
<h2 style="color: #359a89!important; text-transform:uppercase">Bridge of Hope Missions</h2>
</div>
<img class="marker-pin-midwest"
src="~/images/map/map-marker_sm.png"
data-toggle="tooltip"
data-placement="top"
data-html="true"
title="<img width='175' height='175' src='/images/map/BOHMAP-midwest.png' /><br/><br/><b>MIDWEST</b><br/><p>Victims of tragedy across the region receive 120,000 pounds of relief funded by Bridge of Hope partners (IA, ND, AR)</p>" />
<img class="marker-pin-northeast"
src="~/images/map/map-marker_sm.png"
data-toggle="tooltip"
data-placement="top"
data-html="true"
title="<img width='175' height='175' src='/images/map/BOHMAP-northeast.png' /><br/><br/><b>NORTHEAST</b><br/><p>Bridge of Hope and partners deliver 120,000 pounds of aid to strengthen rescue workers and volunteers in the wake of 9/11</p>" />
</section>
If anyone knows a way to make this work as they want it to I'd appreciate the help just stuck on this one. Thanks
I am trying to link the html to the css but am having problems and have become stuck. Any help is appreciated
ive tried using a div class but im new so not too sure what to do
HTML
<!DOCTYPE html>
<html>
<head>
<title>About UnixCast</title>
<link href="about.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="head">
<div class="head">Hi there! I'm Lewis and welcome to UnixCast.com!</div>
<div id="para">
<div id="para1">
<p>If you're reading this I just would like to say a huge thank you for taking the time to want to know who's behind UnixCast. I'm a full-time student with a big passion for learning. I enjoy studying physics and hope to get a degree in astrophysics sometime in the future. I've always had a passion for creating content online. From when YouTube was at the start of its big popularity boom, I fell in love with the idea of sharing content freely for everyone to see. My goals for my content are simple:
<ul style="list-style-type:disc;">
<li>Share my passion and interest with the internet.</li>
<li>Educate my self on topics that I find interesting.</li>
<li>Inspire others to learn about the world around them.</li>
</ul>
</p>
</div>
</div>
<div class="para2">
<p>And that's basically it. If you feel like you'd enjoy my content then feel free to check out what I do by visiting my YouTube and if you enjoy the content please consider subscribing! Have a great day and I hope to see you around!</p>
</div>
</div>
</body>
</html>
CSS
body{
margin: 0px;
padding: 0px;
background-color: #19181D;
}
.head{
font-family: sans-serif;
font-size: 25px;
color: white;
position: relative;
top: 10%;
left: 5%;
transform: translate(-50%, -50%);
}
.para1{
font-family: sans-serif;
font-size: 15px;
color: white;
position: relative;
top: 120px;
left: 5%;
width: 320px;
height: 320px;
margin: 0 auto;
transform: translate(-50%, -50%);
}
Expected result is to get the html to link with the css
Don't know your level of HTML and CSS, but you need to call the CSS file to your html.
You use the .head to call your class = "head" and your #head to call your id="head".
Since you have 2 heads, I would advice to put different names ( to avoid any conflict).
div="head_div" and the other id="head" -> something like that !
And if you have your css file in a folder (lets say, called CSS) you need to define the path in your href (like href="./CSS/cssfile.css)
Hope it helps!
EDIT : my bad, read your text and missed the title -.-
Just add a ID to the <p> tag you want to change and then do your magic in CSS (set the width you want)
<p id ="something"></p>
CSS :
#something{
css here;
}
We have a two column layout where image is on one side with text on the other. We want the image to be the same height as the content. We are having an issue when the text column reaches a certain height, then it will not make the image go full height. Although not added, this .flex__wrapper is surrounded by an outer <div class="container"> element so that we can handle larger screens where we may want to limit the width.
How can we achieve this? Our current solution uses flexbox, but we have also tried the following solutions but none resolves the problem.
Goal:
As the right column containing the text increases in height, i want the image to also take up the same amount of height.
Solutions we tried, but they didn't work. They seem to work well with text and text, but not text and image.
Make two columns the same height (using Flexbox)
Keep columns with same height
(using Tables)
.flex__wrapper {
display: flex;
position: relative;
align-items: center;
background-color: #eee;
}
[class*=col--] {
box-sizing: border-box;
}
.col--m-s-12 {
width: 100%;
}
.col--t-s-6 {
width: 50%;
}
img {
display: block;
height: auto;
}
<div class="flex__wrapper">
<div class="col--m-s-12 col--t-s-6">
<img src="https://thumb1.shutterstock.com/display_pic_with_logo/422872/1024946740/stock-photo-large-group-of-business-people-standing-with-folded-hands-togeth-1024946740.jpg">
</div>
<div class="col--m-s-12 col--t-s-6">
<div>Distinctively engineer timely benefits before leading-edge technology. </div>
<div>Quickly brand strategic web-readiness whereas global relationships. Credibly underwhelm interdependent e-markets via plug-and-play value. Professionally maximize emerging partnerships rather than equity invested information. Objectively morph intuitive applications rather than multimedia based best practices. Competently innovate covalent infrastructures after premium relationships.
Globally conceptualize holistic sources and leveraged synergy. Distinctively maintain stand-alone content without market-driven niche markets. Completely orchestrate seamless channels after high-quality synergy. Rapidiously scale cutting-edge niche markets with reliable innovation. Intrinsicly productize multifunctional manufactured products without high standards in e-tailers.</div>
</div>
</div>
Current issue:
Additional issue:
Desired result:
You need to apply max-width:100% on your image. Now even after applying the following style your image will not take whole place in full screen(1600*900px), this is happening because your original image is of less size(450*274) and the container where your are trying to fit is 792px approx. Try using a bigger image then it will be solved.
.flex__wrapper {
display: flex;
position: relative;
background-color: #eee;
flex-wrap: wrap;
}
#media screen and (min-width: 1024px) {
.flex__wrapper {
max-width: 56%;
}
}
[class*=col--] {
box-sizing: border-box;
flex-basis: 0;
flex-grow: 1;
max-width: 100%;
}
.col--m-s-12 {
width: 100%;
}
.col--t-s-6 {
width: 50%;
}
img {
height: 100%;
width: 100%;
object-fit:cover;
}
<div class="flex__wrapper">
<div class="col--m-s-12 col--t-s-6" style="border:solid 1px;">
<img src="https://thumb1.shutterstock.com/display_pic_with_logo/422872/1024946740/stock-photo-large-group-of-business-people-standing-with-folded-hands-togeth-1024946740.jpg" class="img-fluid">
</div>
<div class="col--m-s-12 col--t-s-6">
<div>Distinctively engineer timely benefits before leading-edge technology. </div>
<div>Quickly brand strategic web-readiness whereas global relationships. Credibly underwhelm interdependent e-markets via plug-and-play value. Professionally maximize emerging partnerships rather than equity invested information. Objectively morph intuitive
applications rather than multimedia based best practices. Competently innovate covalent infrastructures after premium relationships. Globally conceptualize holistic sources and leveraged synergy. Distinctively maintain stand-alone content without
market-driven niche markets. Completely orchestrate seamless channels after high-quality synergy. Rapidiously scale cutting-edge niche markets with reliable innovation. Intrinsicly productize multifunctional manufactured products without high standards
in e-tailers.</div>
</div>
</div>
html:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test3</title>
<link rel="stylesheet" type="text/css" href="test.css">
</head>
<body>
<main class="holder">
<section class="left-div">
<h1 class="flat-invisible">test-3</h1>
<img src="https://thumb1.shutterstock.com/display_pic_with_logo/422872/1024946740/stock-photo-large-group-of-business-people-standing-with-folded-hands-togeth-1024946740.jpg" alt="stock photo large group of business people standing with folded hands together">
</section>
<aside class="right-div">
<div>Distinctively engineer timely benefits before leading-edge technology. </div>
<div>Quickly brand strategic web-readiness whereas global relationships. Credibly underwhelm interdependent e-markets via plug-and-play value. Professionally maximize emerging partnerships rather than equity invested information. Objectively morph intuitive applications rather than multimedia based best practices. Competently innovate covalent infrastructures after premium relationships.
Globally conceptualize holistic sources and leveraged synergy. Distinctively maintain stand-alone content without market-driven niche markets. Completely orchestrate seamless channels after high-quality synergy. Rapidiously scale cutting-edge niche markets with reliable innovation. Intrinsicly productize multifunctional manufactured products without high standards in e-tailers.</div>
</aside>
</main>
</body>
</html>
css:
.left-div {
float: left;
grid-area: section;
max-width: 100%;
max-height: 100%;
}
.flat-invisible {
margin: 0em;
padding: 0em;
line-height: 0em;
height: 0em;
visibility: hidden;
}
.left-div > img {
object-fit: cover;
top: 0px;
height: 100%;
max-width: 120%;
}
.right-div {
padding-top: 2em;
padding-bottom: 2em;
padding-left: 150px;
max-width: 50%;
grid-area: aside;
max-height: 100%;
}
.holder {
max-width: 90%;
background-color: #eee;
display: grid;
grid-template:
'section aside';
}
This is supposed to be a twitter feed I am building, the class src-twitter is basically a timestamp and username of the poster, It should be on the lower right hand corner of the , but in the result is is right in the middle of the quote.
<div class="feed-bottom">
<div class="post1">
<p>
"You have brains in your head. You have feet in your shoes. You can steer yourself in any direction you choose. You're on your own, and you know what you know. And you are the guy who'll decide where to go." - Dr. Suess
</p>
<p class="src-twitter">
#username 5:55pm September 20, 2014
</p>
</div>
</div>
CSS:
.post1{
position: relative;
}
.src-twitter {
color:#dfdfdf;
font-size: 12px;
position: absolute;
bottom: 0;
right: 0;
}
Seems no need to use position for this, just text-align do the trick
Updated CSS:
.src-twitter {
color:#dfdfdf;
font-size: 12px;
text-align:right;
}
Fiddle Demo
Please check this jsFiddle. The timestamp now appears at the bottom-right corner of the tweet. This is the new CSS which I've added:
.src-twitter {
color:#dfdfdf;
font-size: 12px;
float: right;
margin-top: 0px;
}
I have created a fiddle that still makes use of absolute positioning.
CSS:
* {
margin: 0;
padding: 0;
}
.post1{
position: relative;
padding: 16px;
}
.src-twitter {
color:#dfdfdf;
font-size: 12px;
position: absolute;
bottom: -16px;
right: 16px;
}
HTML:
<div class="feed-bottom">
<div class="post1">
<p>"You have brains in your head. You have feet in your shoes. You can steer yourself in any direction you choose. You're on your own, and you know what you know. And you are the guy who'll decide where to go." - Dr. Suess</p>
<p class="src-twitter">#username 5:55pm September 20, 2014</p>
</div>
</div>
I have added a simple reset to the HTML so you can have more control over margin & padding, as this will also affect the position (alignment) of your elements. I then add the padding back and then use the same units to position the author name with a negative bottom (you didn't do this that's one reason why it was in the middle of the main paragraph).
<div class="feed-bottom">
<div class="post1">
<p>
"You have brains in your head. You have feet in your shoes. You can steer yourself in any direction you choose. You're on your own, and you know what you know. And you are the guy who'll decide where to go." - Dr. Suess
</p>
<p> </p>
<p class="src-twitter">
#username 5:55pm September 20, 2014
</p>
</div>
</div>
Position absolute does not expand the height of post1 ... easy solution is to add a empty space. Alternatively you can specify the height for post1.