#ot | Help me for HTML CSS pls (I wanna die)
1 messages · Page 1 of 1 (latest)
se connecter?
oui
what is the button supposed to do ? 🙂
you have no action on it
yes
in your js add
document.getElementById('send').onclick = function() {
console.log('clicked on button');
}
.stupid
also, if you are going to respect the html syntax
what you're doing is a connection form
so it should be in a <form> tag
oh
and to submit these you don't use a <button>
you use a <input type="submit">
didn't know
no problem 😉
what do you have to do overall
here is what I have to do
oh thx
btw, do you know how to put text transparent with like exemple@mail.com in E-mail case when I'm not in?
in my HTML I guess?
on the input tag ye
sry I ask stupid questions
it's not a stupid question 🙂 you're learning the stuff
what endpoints have you done so far
wdym
0
maybe you want to start with this
well you'll need the page at some point
last 2 times we had to build an API I didn't understand anything and didn't do it
I tried my best
but I just didn't understand anything
so I want to do what I know I can do 1st
do max % possible
100% speedrun WR
cause I know that I'll spend the entire week on the API for nothing cause I wont have anything
WR = ?
world record
oh
ok
but I'm bad. I don't have enough time
for others it's enough but for me who struggle it's not...
just, how can I change placeholer color?
I found
but I don't find how to put it a bit more on the right
can you remind me how much your school costs?
7000€/y
d'oh
9000€/y from 3rd year
and it's a 5y degree?
okok
think i paid 35 euros overall for my 5y at uni
and you surely got more help than me
im puzzled with the project, i can't see where you're supposed to hit to login
fr it's not even the school everyo)ne presented me
what was it described as?
everyone was telling me "you come when you want as long as you give your projects in times"
I have a planning for everyday
so you actually got lessons?
so what's the planning for then
for nothing
just we have to be here
that's all
10h - 17h
there is worst for sure
but what's the point to come if I don't have anything planned?
what do the others do?
and distancial days but these are going to disappear cause it was director who was fighting against national direction who is changing everything just gave her demission
wdym
the other students who come every day between 10 and 5
what do they do at the school
what happens if you don't come to do the work and do it at home tho
so we are going to have to follow national direction: 8h - 20h everyday without day off
you can get fired
not even saturday sunday?
weekend of course
ah ok
but I have a day off during the week
usually tuesday (mardi ?)
but it change nearly every week...
yes tuesday mardi
Quite annoying for me who wanted to find a job ):
you already have one, it's the projects at school
parents can't afford the school?
moreover if next year I want to live with my gf, I'll have to pay
they pay
anyway, how's this login page going
slight details, how far is the placeholder frm the left?
first page, it says mobile phones and computers
yes
so you can't use pixels as a unit
https://www.w3schools.com/cssref/css_units.php check the relative units 🙂
they gave you the css?
no
you can change everything
Source code for the one page website for Historycraft.fr - historycraft-website/style.css at main · Rebstew/historycraft-website
example of css i wrote, the px unit is barely used
wd for you
all the texts i used rem
you are smarter than me
i'm more experienced
you can fix this now or pile the shit and have a huge pile of shit to go through at the very end
choice is yours 🙂
you can do this, don't worry. but you can probably not do this alone
at the beginning it was supposed to be done at 2
but after 4d they came and said "this was an error, this is to do alone"
are you supposed to also code the backend? it's unclear from the pdf
yes
I'm supposed to do all
okay
do you have a rough idea of where to start on that part, database, server technology..
i would suggest node, express and mongo
i will do with JS
cause I know JS
but everything with DB I'm lost
@cunning oracle btw, how can I center my div with relative things...
node and express are using javascript, mongo stores json
ye
it did work
?
oh..
what i would use for all this fucky alignment is flex
One of the reasons that flexbox quickly caught the interest of web developers is that it brought proper alignment capabilities to the web for the first time. It enabled proper vertical alignment, so we can at last easily center a box. In this guide, we will take a thorough look at how the alignment and justification properties work in Flexbox.
everything that's about alignment i just use flex boxes now, it's just hyper convenient
how did you do it?
hmm
oh.
tbh, they mentionned using bootstrap
which has super convenient classes to add for that
yes but I can't do all with it...
wdym
I will never learn
oh you will learn dw
alright
the percent idea is good, the problem is it's the position of the topleft corner
so if you wanna position it using that, you also need to subsctract the half width/height of your element, and i don't think in css you can know it
I found a way on internet to center horizontally
yes
problem is always center vertically
in css
maybe a wee bit of flex box for this specific thing could help you finish
just check it's ok in mobile
maybe flex 😄
but you should really move on to the next bits
wdym
the rest of the project
oh
just put display: flex and align-items:center to the container that holds your form
already done
#login {
display: flex;
justify-content: center;
align-items: center;
background-color: #2e2e2e;
background-size: cover;
max-width: 700px;
height: 400px;
border-radius: 30px;
box-shadow: -5px 5px 15px rgb(31, 31, 31);
scale: 130%;
opacity: 0.98;
margin: 0 auto;
vertical-align: baseline;
}
show the html?
<!DOCTYPE html>
<html>
<head>
<html lang="fr">
<meta charset="utf-8">
<title>Pokedex - Connexion</title>
<link rel="stylesheet" href="login.css">
<script src="login.js"></script>
</head>
<body>
<!-- <img id="back" src="Assets/ethan_ho_oh_hd_pokemon.jpg"> -->
<div id="login">
<center>
<h3>Connectes-toi</h3>
<br>
<h5 id="mail_title">E-mail :</h5>
<input type="email" id="mail" pattern=".+@" required placeholder="exemple@mail.com">
<br>
<h5 id="pass_title">Mot de passe</h5>
<input type="password" id="mdp" required placeholder="Mot de passe">
<br>
<button id="send" type="button">Se connecter</button>
</center>
</div>
</body>
</html>
ah ik
it's the body tag that doesn't take all the height of the window.
also, to make it work, your login div MUST be inside another container where you will apply the flex rules (align content, justify content..)
you shouldn't do it on body
<!DOCTYPE html>
<html>
<head>
<html lang="fr">
<meta charset="utf-8">
<title>Pokedex - Connexion</title>
<link rel="stylesheet" href="login.css">
<script src="login.js"></script>
</head>
<body>
<div class="centeredContent">
<div id="login">
<h3>Connectes-toi</h3>
<br>
<h5 id="mail_title">E-mail :</h5>
<input type="email" id="mail" pattern=".+@" required placeholder="exemple@mail.com">
<br>
<h5 id="pass_title">Mot de passe</h5>
<input type="password" id="mdp" required placeholder="Mot de passe">
<br>
<button id="send" type="button">Se connecter</button>
</div>
</div>
</body>
</html>
#login {
background-color: #2e2e2e;
background-size: cover;
width: 25%;
max-width: 700px;
height: 400px;
border-radius: 30px;
box-shadow: -5px 5px 15px rgb(31, 31, 31);
opacity: 0.98;
}
.centeredContent {
display: flex;
justify-content: center;
align-items: center;
height: 100vh
}
(i used height 100vh for the content not spreading enough in height)
@cunning oracle hey thx for the help, can I ask you something else?
ofc
when it's like this, the box doesn't "open" on sides
it makes the box rly small
it would be better it "opens" on sides
ermmm, say it jn french pls 😂
😭
Je suis si nulle que ça ? 😭
en gros
pour que ça s'élargisse sur téléphone
par que ça reste aussi petit
car c'est adapté pour PC mais sur tel... /:
ah yes erm… i usually use bootstrap for that lol. it allows you to define different sizes in percent in flex, depending on the screen size
you need media queries (google it) to define breakpoints that basically mean “this js a phone”, “this is a tablet “ “this is a computer “
yeah you should 😉
yes
also you don’t need to use that many ids, most of what you want to format is gonna be classes 🙂
use id if you need some specific behaviour in js
(you can also add behaviours to all elements in a class but it’s more tedious)
not really, an id has to be unique
if you do #foo, you know there can be only 1 element on the whole page that fits
seems logic?
it does yeah 😄
so imo, you shouldn’t use ids to apply css, most of the time
but rather put the css in a class, that you will reuse on similar components (buttons for instance)
@cunning oraclejust how do I move this up pls :c
just put it in your div, under the connect button?
where is it in the html
with the flez thing it should be centered and just under the big form
also remove the center tags inside the form, you shouldn’t need them as they’re deprecated
hmm
flex-direction: column
add that in centeredColumn in the css
yay
do you think there is a way to put it closer from the box?
I found a way
it's a bit of solution Z but it works xD
how did you do it?
I removed margin bottom from login
puted it in new
and added a top margin in new again
yeah reducing the margin was the way to di it
I removed the margin
this was the margin which was here to move the case a bit upward
ok time to do some backend now
hope the people around you will have some tips to give you 🙂
ok I wont ask you anything anymore dw
well you can, but i might not know
here I'm doing new acc front
it should be quick
@cunning oraclejust, why is my button like this? I don't manage to make it wider
When I have my mouse on it
it just show me center /:
and now it works I make it wider
but still
button still doesn't work
open the center tag on the right
click on yout button in the inspector and check the width of it in the effective css
also, absolute link in the href? no good
??
why
because the links won’t work on another computer
do ../ to climb the file hierarchy
oh thx
also, avoid spaces in the folder names
because a button has no default behaviour
and with css you’ve removed the visual cues that it’s clicked
oh
how do I bring it back
you need to add :active iirc to change the colour to a darker colour than that when it is not clicked
a new class
with just the color
@cunning oracleI'm definitely better for backend than frontend lmao
also im not the best person to give advice on this but isn't the <centre> tag outdated in html5
it is deprecated ye
yea
it serves no syntaxic purpose and therefore should ditch
learned that the hard way 
until last week, i had no idea how powerful html animations could be
don't need more help?
you won’t finish as in?
didn't understand :c
login/registration system
cause I just don't understand how to do
people at school haven’t been able to explain to you how to make this bit?
they didn't explain me
not teachers, but classmates
yes, they didn't explain me
you’ve asked but they didn’t explain? 😦
I asked one
but he doesn't know how to do too
I don't talk to others
unless you’re excellent, you can’t afford to stay isolated and not talk to people, i’m sorry!
I don't know how to do
I'm worst at talking to ppl than progamation, just to give you an idea...
@cunning oracleI asked to as 2nd person, she told me to watch tutorials
very helpful..
surely one of them will have a wee bit of time to explain to you 🙏
what do you want to do
the image to be in my circle
oh i see. what you want to do is draw the image that changes first, then draw the circle ontop of it.
so i would put 2 img tags in a div, that each take the same dimension
the circle being transparent in tbe middle
do you follow what i mean?
no
first you draw the image in a square or sth
then ontop of that, you draw the blue image with a transparent circle in the middle
this is a button
actually, the logo image just needs to fit in the center of the djv
set a background image to the button then, why is it a button
it' s a button cause I want it to redirect to yr profile
alright, important bit about html
it’s a language that describes a page, it’s tags are syntax bits that have a specific meaning
if clicking on something doesn’t submit a form, but it changes the page you’re on, then jt has to be an <a> tag
in an a tag you can also have children like with the button tag
do you understand how to do it now or not?
I'm back
hi back
but yes i understood
great, hmu if you can’t pull it off 😉
hmu = ?
ok ok
@cunning oracle hey, do you know how to espace my cards but they still stay at the middle?
use the gap property on the thing that has the display: flex, example gap: 1em
i googled “flex margin between items” just so you know
ok thx
@cunning oracleuh..
nope
I deleted it but didn't change anything so no
hmmm, in the inspector, click on the card in the middle and check the effective style, you should be able to see some margin there ig
take the name of the css property and try to tweak it
I found something but it doesn't change the fact that it's one column
hmm
@cunning oracle
have you tried adding align-items: center to your #cartes @glacial axle
sorry I was too tired and I stopped to work
npnp
@cunning oraclebut I'm back this morning and it didn't work ):
did that change anything
nothing
can you show me the same screenshot with the cartes selected and the inspector open?
with that?
yes
i can’t see the classes on #cartes :c
@cunning oracle
keep on trying with the css, maybe there’s one column too many columns?
i can try something around 12:30 on my machine
I went on something else
cause time
I'm running out of time
yep you are
@cunning oraclehey, were you able to try what you wanted?
no but i can do it now
if you want this would be cool!
ok, try justify-self: center on a card
does it give you the result you want? if it doesn’t, i will need a drawing of it
you defined 4 columns on your grid template column, is it what you want?
also no need for a br tag since you use display grid
no
only 3
remove one “auto”
basically, align-items: center on the container will center vertically
justify-self: center on the content will center horizontally
like this
@glacial axle
ok np
I'll do it once I'm at home
so, did you manage to send something that worked somewhat?
It's only frontend


