Using Brackets #4

.                 Screen Shot 2014-12-02 at 16.18.26 (1)     Screen Shot 2014-12-02 at 15.34.25

Today using Brackets I had do find this pre-made code and basically fix it so it was right. What I had to do was look at this code and work out how we can make it better. So what I did was was copy part of the code (<div class=”box”> ect…) which holds the information of then boxes then pasted that part of the code into a new file called box.php and place the code into it. Then I was able to cut that part out of the main part of my code to clean it up and just type in the include 3x over to make the 3 boxes.

This did work so far but didn’t 100% work as i couldn’t get an equal about of boxes and they wouldn’t line up. so I had to go back to the code and see what else I can do to make it better. Then I looked at the code saying…Screen Shot 2014-12-02 at 16.15.38

I then changed the box.php file and replaced it with this. I also had to go back to the main file and change some things around such as, the number of boxes to 9 as I wanted 9 boxes so it was even and nice and also had to change the ‘while’ which was the number of boxes to > 0 as the boxes will always be more than 0. Then in the while I have added the ‘box.php’ file so when the number of boxes are over 0… e.g. 9? this will add that box.php code how many ever times it needs in this case 9.

Then after all of this and even throughout this process I had too keep uploading these files back into Filezilla and uploading them so I could view them on a webpage and see what had worked and what had not. Not makes it more difficult is that you have to save the files to upload them each time inorder to see what did work or not. So if something went terribly wrong you have no backup to work from and have to write out the code again which is annoying but you mange to work with it in the end

Screen Shot 2014-12-02 at 16.15.27  Screen Shot 2014-12-02 at 15.29.18


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s