How do you test the position of elements on the screen?

Asked

Viewed 33 times

1

I use the Visual Studio 2017 and every time I make any changes in css I have to reload the page (and this takes time), there is some way to make changes using visual studio or even the browser to test positions, colors, among others without having to load the page?

  • Buddy, I work with two screens, so in one is my IDE and in the other has the browser. I only use a Reload plugin to avoid updating my browser several times. For example, Browser-Sync is one of them. The link below that I passed can help you in this and just need to do the code in Vscode and give CTRL+5 to save and update automatic. If it works for you, don’t forget to give your vote there :D

  • You can see my answer here: https://answall.com/questions/347073/existe-algum-editor-ou-ide-que-tenha-op%C3%A7%C3%A3o-de-live-preview-para-php/347084#347084

  • I created my account yesterday, still can not vote, but as soon as release I vote yes, thanks for the tip

  • Sure, no problem. I hope I helped!

  • 1

    You can use Ruby to create a whatcher that will monitor your file and in Save it does a Reload in the browser. But if you want something simple VS Code has very practical options... You need a solution for Visual Studio only or it can be for Visual Studio Code?

  • For visual studio, I don’t use visual studio code

  • 1

    Sometimes it helps so you can directly save your . css using Chrome Devtools. So everything you change in Devtools Inspect you save in . css/. html! https://answall.com/questions/160767/existe-alguma-forma-de-salvar-as-edi%C3%A7%C3%B5es-feitas-no-Inspect-element/296826#296826

Show 2 more comments

1 answer

1


Me, when I’m messing with css I usually do a small part and inspect the page, in google Chrome, F12 key, in this way, I make changes that show me in real time on the page, after staying the way I want, I copy what I did and step to my code, I will show in image:

This is my page, when inspecting the page pressing F12 I have this option on top to select an element on the screen:

inserir a descrição da imagem aqui

Just after clicking on it and clicking on some element, I can make the changes I want on the right side of the screen:

inserir a descrição da imagem aqui

Ex: I changed the top property and it already showed me automatically how it looks:

inserir a descrição da imagem aqui

The problem is this, if I make many changes at once and forget to pass to my code, I end up losing what I did (whenever I update the browser, loses the changed information), so I always try to pass, so it got the way q I would like

  • Jeff will give you a hint and you will never need to keep doing Chrome inspector’s Ctrl+C/V. Take a look at this answer. It teaches how salvage the changes you make in Devtools right in yours. CSS without having to copy etc... https://answall.com/questions/160767/existe-alguma-forma-de-salvar-as-edi%C3%A7%C3%B5es-feitas-no-Inspect-element/296826#296826

Browser other questions tagged

You are not signed in. Login or sign up in order to post.