[CSS] Can you help me move an element?

Benden

maging ang maganda mamatay
Jun 4, 2010
2,286
1,482
Hey, I'm not great at CSS so I was wondering if someone can move an element for me and explain how to do it

Codepen:

I want to have the USERNAME component (dropbtn3) of the nav bar on the right side while the rest of the buttons are on the left.

You must be registered for see images attach
 

Benden

maging ang maganda mamatay
Jun 4, 2010
2,286
1,482
Simplest way is

.right {
float: right
}

and change <div class="dropdown"> to <div class="dropdown right">
Wow you fixed it so easily hahaha.

to see the changes I just added float:right; to the .dropdown element.
I swear I tried that before but apparently not.

Close thread.
 
Last edited by a moderator:

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,933
Alternatively, you could use , which would be the preferred method.


When you use float, it's not going to play well if the content on each side "come into contact".
 

Users who are viewing this thread

Top