Skip to content
← Back to Community
How do you put text to the top, left corner in css?
Profile icon
[deleted]

I need to know this for my website..

Answered by programmeruser [earned 5 cycles]
View Answer
Voters
Profile icon
AustinOldfield
Comments
hotnewtop
Profile icon
programmeruser

Try this:

#text { left: 0; top: 0; }

Now make sure your text has a id of text:

<p id="text">I am located at the upper right corner!</p>

(not related, but are you https://forum.snap.berkeley.edu/u/gacha-girl?)

Profile icon
[deleted]

Yes, I certainly am @programmeruser

Profile icon
[deleted]

And it works, thanks @programmeruser

Profile icon
NateRiver0

body {
padding:0;
margin:0;
}
#header {
height: 100px;
float:left;
}

.help_header {
float:right;
}

(: found this on https://stackoverflow.com/questions/31212187/how-to-make-text-appear-at-the-top-left-corner
if i helped please press the check

Profile icon
[deleted]

Sorry @therealebraheem it didn’t work :(

Profile icon
NateRiver0

@Coder2404
oh well! wish you good luck on your personal project!

Profile icon
[deleted]

Thanks @therealebraheem do you mind if we became friends?

Profile icon
NateRiver0
Profile icon
[deleted]

Yay @therealebraheem I have 2 friends now

Profile icon
[deleted]

I just realized I never had 6 cycles @therealebraheem where did it come from?
(Not like I’m complaining)

Profile icon
NateRiver0

@Coder2404
i just liked all of your replies

Profile icon
[deleted]
Profile icon
[deleted]

Why did you like all of my replies? @therealebraheem

Profile icon
NateRiver0

@Coder2404
IDK :p

Profile icon
[deleted]

Like seriously @therealebraheem

Profile icon
[deleted]

I won’t be mad @therealebraheem

Profile icon
NateRiver0

@Coder2404
what do you mean by that

Profile icon
[deleted]

I mean can you please tell me why you liked my replies @therealebraheem ?
You don’t have to if you feel uncomfortable.

Profile icon
NateRiver0

@Coder2404
i wanted you to have more ? ?????????

Profile icon
[deleted]
Profile icon
[deleted]

Why would you ever do that for me? @therealebraheem

Profile icon
[deleted]

Ok just nevermind, talk to you tomorrow! @therealebraheem

Profile icon
NateRiver0
Profile icon
[deleted]
Profile icon
[deleted]
Profile icon
NateRiver0
Profile icon
[deleted]

Hey @therealebraheem how have you been?

Profile icon
NateRiver0
Profile icon
[deleted]

I’ve been good too @therealebraheem

Profile icon
[deleted]

@therealebraheem Do you know how to make a sidebar?

Profile icon
NateRiver0
Profile icon
[deleted]

@therealebraheem Hey how are you, I’m good, how about you?

Profile icon
[deleted]

@therealebraheem hey, how have you been?

Profile icon
[deleted]

@therealebraheem hey, how are you?

Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0

@Coder2404
your not talking much

Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0

what langeus to you [email protected]

Profile icon
NateRiver0
Profile icon
NateRiver0

wanna work on [email protected]

Profile icon
NateRiver0

@Coder2404
why arent you responding

Profile icon
NateRiver0
Profile icon
NateRiver0

@Coder2404 please respond

Profile icon
NateRiver0
Profile icon
NateRiver0

@Coder2404
are you gonna respond please

Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0

want to make a project pls
@Coder2404

Profile icon
NateRiver0

ill help with the [email protected]

Profile icon
NateRiver0

its okay if your [email protected]

Profile icon
NateRiver0

@Coder2404
well bye for now

Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0
Profile icon
NateRiver0

@Coder2404ugh sorry my little sister keeps spamming!!!
how are you. coder2404?

Profile icon
[deleted]
Profile icon
[deleted]

@therealebraheem not really

Profile icon
[deleted]

@therealebraheem fine, you can can help with a project, but why were you not responding before?

Profile icon
[deleted]

@therealebraheem it’s, okay, I’m NOT mad 😀

Profile icon
[deleted]

@therealebraheem just don’t spam me next time
I literally have more than 50 messages in my notifications, LOL

Profile icon
[deleted]

@therealebraheem who is your little sister?

Profile icon
[deleted]

@therealebraheem um, here is my schedule of my school days
8:50-9:00 I can talk to you
9:00-10:15: Math
10:15-10:30 I can talk to you
10:30-11:10: Technology
11:10-11:25:I can talk to you
11:25-12:15: Reading
12:15-1:00:I can talk to you
1:00-1:50:Writing
1:50- End of day :)

Profile icon
[deleted]

@therealebraheem hey, how are you?

Profile icon
[deleted]

@therealebraheem why are you not responding..😔😔😔

Profile icon
[deleted]

@therealebraheem What language do I use? HTML and CSS.Not really JavaScript :p

Profile icon
[deleted]

@therealebraheem are you there?😔😔😔😔

Profile icon
NateRiver0

@Coder2404
do you use python

Profile icon
[deleted]

@therealebraheem no, I don’t

Profile icon
NateRiver0

@Coder2404
hey, sorry i dont wanna talk that much anymore, from the start i just wanted to answer your question.

Profile icon
[deleted]

@therealebraheem then why did you spam me yesterday
(But I’m NOT mad)

Profile icon
NateRiver0

@Coder2404
Wasnt me sorry bout that

Profile icon
[deleted]

@therealebraheem who was it then?

Profile icon
NateRiver0

@Coder2404
im not gonna respond anymore

Profile icon
[deleted]
Profile icon
NateRiver0

@Coder2404
im sorry

Profile icon
NateRiver0
Profile icon
[deleted]

@therealebraheem what are you sorry for?

Profile icon
[deleted]

@therealebraheem hey, how are you?

Profile icon
[deleted]

@therealebraheem is this your school?
Leota Middle School
19301 168th Ave NE, Woodinville, WA 98072

Profile icon
[deleted]
Profile icon
NateRiver0

your on a apple device?

Profile icon
NateRiver0

you live in brooyklyn right??

Profile icon
[deleted]

@therealebraheem yes, but how did you know?

Profile icon
[deleted]

@therealebraheem please respond

Profile icon
acli26
.topcontainer { position: relative; } .text { position: absolute; left: 0; top: 0; }
Profile icon
RYANTADIPARTHI

Solution

here's how you do it.

<body> <div id="header"> <p class='help_header'>text text text</p> </div> </body>
body { padding:0; margin:0; } #header { height: 100px; float:left; } .help_header { float:right; }

like that. The top is HTML, and the bottom is css.
That should work.

here's a link for more info.

https://stackoverflow.com/questions/31212187/how-to-make-text-appear-at-the-top-left-corner

Profile icon
EpicGamer007

make it position fixed then set top: 0 and left: 0.

Profile icon
[deleted]

How do you exactly do that? @EpicGamer007

Profile icon
EpicGamer007

@Coder2404 css... create something called style.css then link it to the html. then access the element and add the styles

Profile icon
[deleted]
Profile icon
tussiez

@Coder2404 There you go!

Profile icon
[deleted]

I haven’t learned a lot so I needed a lot of help. @tussiez

Profile icon
tussiez
Profile icon
[deleted]

@tussiez (Sorry if I’m annoying) but can you show me how to do it?
You are my friend anyway...