Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,162,914 members, 7,852,067 topics. Date: Thursday, 06 June 2024 at 12:20 PM

Please How Do I Adjust This with Css - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Please How Do I Adjust This with Css (724 Views)

Officially Done With CSS... Advice For Newbie!!! / [Software Review]My 1st Mobile App, Please Evaluate & Let Me Know What To Adjust / Help With CSS (2) (3) (4)

(1) (Reply) (Go Down)

Please How Do I Adjust This with Css by OGWILLS123: 9:19am On Oct 10, 2020
Good day my senior programmer's in the house cool

Please how do i adjust that fvken nairaland box grin to
fit at the center with the login input fields

Thanks cool

Re: Please How Do I Adjust This with Css by OGWILLS123: 9:23am On Oct 10, 2020
abeg ooh
lala do the needful nah angry
Re: Please How Do I Adjust This with Css by HotPoundedYam(m): 10:04am On Oct 10, 2020
OGWILLS123:
Good day my senior programmer's in the house cool

Please how do i adjust that fvken nairaland box grin to
fit at the center with the login input fields

Thanks cool
. Thou Shalt not clone
Re: Please How Do I Adjust This with Css by aronski(m): 10:14am On Oct 10, 2020
<center><p>NAIRALAND</p></center>
Re: Please How Do I Adjust This with Css by OGWILLS123: 11:41am On Oct 10, 2020
HotPoundedYam:
. Thou Shalt not clone
@HotPoundedYam

To pound you now the hungry me angry
Re: Please How Do I Adjust This with Css by OGWILLS123: 11:46am On Oct 10, 2020
aronski:
<center><p>NAIRALAND</p></center>
Olu wa bless you my brother cool

@-wepkit- web design here I come tongue

1 Like

Re: Please How Do I Adjust This with Css by Winnerrrr(m): 12:17pm On Oct 10, 2020
Suggestion.

Style your CSS in the CSS section, it's more neater and will also boost rendering speed.
Re: Please How Do I Adjust This with Css by etoluw: 1:29pm On Oct 10, 2020
aronski:
<center><p>NAIRALAND</p></center>
this method is outdated
use this instead p { margin:0 auto; }
Re: Please How Do I Adjust This with Css by cixak95211: 1:54pm On Oct 10, 2020


1. Create a parent container to hold a) niaraland div b)form div

2. Set the parent container to display: flex AND direction to be flex column AND justify content by center AND align items by center

3. Optional steps: The form div that contains username and password input, can be set to also display flex, or you could just stack each one on top of the other and seperate them using margin-top.

I suggest you go the flex route, because it will make your page responsive at all breakpoints i.e. they will shrink and grow along with the view port

Using a utility-first framework like tailwindcss, you would to this

<div className="flex flex-col justify-center items-center w-5/10 mx-auto"
<div className="flex flex-col justify-center items-center">
<input name="username" type="text" id="username" placeholder="username" className="h-10 rounded-lg"/>
<input name="password" type="password" id="password" placeholder="password" className="h-10 rounded-lg mt-6"/>

//......more divs as u deem fit here
</div>
</div>

Re: Please How Do I Adjust This with Css by Anonime1105(m): 1:57pm On Oct 10, 2020
OGWILLS123:
Good day my senior programmer's in the house cool

Please how do i adjust that fvken nairaland box grin to
fit at the center with the login input fields

Thanks cool

body{ display: flex;
Justify-content: center;
}

2 Likes

Re: Please How Do I Adjust This with Css by aronski(m): 5:28pm On Oct 10, 2020
etoluw:

this method is outdated
use this instead p { margin:0 auto; }
cheesy ha! 9ja devs .. Did I hear u say "outdated", HTML 5 tag outdated again... Ha!
Re: Please How Do I Adjust This with Css by Karleb(m): 5:42pm On Oct 10, 2020
aronski:

cheesy ha! 9ja devs .. Did I hear u say "outdated", HTML 5 tag outdated again... Ha!
Center is not an html5 tag.

1 Like

Re: Please How Do I Adjust This with Css by cixak95211: 7:01pm On Oct 10, 2020
Karleb:


Center is not an html5 tag.

Thanks for correcting him . . center was deprecated as afar back as HMTL4 in favor of text-align property . .
Was very disappointed he even said "9ja devs" and even far disappointed, somebody would mention
center and using standalone-tags in 2020 when we have flexbox and grids

2 Likes

Re: Please How Do I Adjust This with Css by Karleb(m): 7:38pm On Oct 10, 2020
cixak95211:


Thanks for correcting him . . center was deprecated as afar back as HMTL4 in favor of text-align property . .
Was very disappointed he even said "9ja devs" and even far disappointed, somebody would mention
center and using standalone-tags in 2020 when we have flexbox and grids

cheesy.

"9ja devs" are like that sometimes.

@op take your time to learn flexbox and grids o, they'll make you life easier. Also learn how margin and padding works.
Re: Please How Do I Adjust This with Css by aronski(m): 8:55pm On Oct 10, 2020
Karleb:


Center is not an html5 tag.
?
Re: Please How Do I Adjust This with Css by Karleb(m): 8:59pm On Oct 10, 2020
aronski:
?
I saw your comment before you edited it.
Next time do a Google search before embarrassing yourself.
Re: Please How Do I Adjust This with Css by aronski(m): 9:02pm On Oct 10, 2020
Karleb:

I saw your comment before you edited it.
Next time do a Google search before embarrassing yourself.
cheesy Damn nigarr! I surrender!
But <center> did the job :/
Re: Please How Do I Adjust This with Css by OGWILLS123: 9:58pm On Oct 10, 2020
Anonime1105:

body{ display: flex; Justify-content: center; }
not working
Re: Please How Do I Adjust This with Css by aronski(m): 11:03pm On Oct 10, 2020
OGWILLS123:
not working
It should be p { display: flex; justify-content: center; }

(1) (Reply)

Yankee Facebook Needed / Becareful When Working For A "One Man Business" As A Programmer / Web Developer / Help Needed On C

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 18
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.