Bolt Network


#1

How can i change the position of the pull-right div a little bit left?


#2

you can use the margin-left css property


#3

did you see the code? i tried it in both .pull-right ul .pull-right li and doesn;t respond.

Also it is at in a top right position. Is it a problem with the div?


#4

set the pull right div's position to relative


#5

it worked somehow but it responds weirdly in smaller screens.


#6

the whole idea of .pull-right (which uses a float) is to pull the element completely to the right hand side, using margin to counter is tricky

instead, give .pull-right a padding-right, this will push the ul inside to the left

or use position: relative; and right: ..px on ul, that should also do the trick, given relative position works different from static position

@vlasischar, why is there no .pull-left on your bolt network image:

<div class="col-md-2" ><!-- no pull-left on this div? -->
          <img src="https://s3.amazonaws.com/codecademy-content/projects/bolt-network/logo.svg">
        </div>

see comment. Float is tricky to work with, it takes element out of normal document flow, its easier to get bolt-network image and login on the same line when you also use pull-left, rather then fiddling with margins, which inevitable causes problems on smaller screens


#7

so when i have to divs inline and use pull-right, i have to use and a pull-left property?


#8

yes, you should, given how float works. Given its one of the trickiest things, there is even a visualization video:


#9

I'll take a look!!

Thank you very much!!!