CSS Force a table to stay in one spot.

+3 Tatrasiel R · June 22, 2015
Good day everyone! CSS isn't my strong suit nor has web development ever been but, I currently have a login form that is in a table. I have it set on the right top above a search bar. I noticed however, that when people login the table moves over to the left to put the persons name in . 

How can I prevent this from happening? How can I keep the table still and allow for the username to just fill to the right? If you want to see the site I can show you but for now here is some code.


        float: right;
        margin:0px 165px 0px 0px ;
        padding-bottom: 5px;


html code .

Let me know if you need anything else.


EDIT oddly enough TNB doesn't escape my html and deletes it... weird. Let me know if it's still needed.

Post a Reply


- page 2
Oldest  Newest  Rating
0 Rehman . · June 22, 2015
Its okay Tatrasiel, well see this screen shot there isn't the display like yours, i think there is some problem with your browser cache. Run it on any other browser however its slightly mismatched 

0 Siamon Hasan · June 22, 2015
i think you want to achieve  something like this. if i am correct then let me know./images/forum/upload/2015-06-22/9f0fd93414b23e4d43cf9e4f60fb2a8e.png
0 Tatrasiel R · June 23, 2015
I had it changed to 130 for a bit, but once you go back, you log out it will be pushed too far to the right. I think to "fix" this scenario is have a different div name for logged in and logged out.

I was hoping for a more universal way to solve this problem.
0 Rehman . · June 23, 2015
Try the method i told you in message, made a dive and leave the margin thingy put that dive on float right !
0 Tatrasiel R · June 23, 2015
Ok. let me test that out.
0 Tatrasiel R · June 23, 2015
Thanks the idea worked. I am sure there is a better way to do this but here is the hack that I cam up with ...

        /*margin: 0px -30px 0px 0px;*/


        margin:0px 0px 0px 0px ;
        padding-bottom: 5px;

0 Rehman . · June 23, 2015
Try these out more comfortable

.Logintable {
float: right;
padding-bottom: 5px;

.InterLogintable {
float: left;
width: 235px;
0 Tatrasiel R · June 24, 2015
Thanks Rehman Khan . I am implementing this now. :)
0 Rehman . · June 24, 2015
nope, and nice looking site you have built  :)
0 Tatrasiel R · June 25, 2015
Thanks! I am not very skilled with web coding yet. To me, web code is a very special place that is kind of weird to me.
  • 1
  • 2

HTML / CSS / Web Design


Discuss, share, ask, learn and teach HTML5 and CSS3.