Jump to content

New spacing used in 1.6 code? Confused question.


NBBO

Recommended Posts

Hey Prestapeeps.

 

I´ve been a bit confused with the code layout of version 1.6, especially the css. A lot of the files are using the space button as spacing tool, and not the tab button as normally used. Can´t find anywhere on forum or documentation, saying that this is a change and not an error?

 

First i actually formated the files; global.css, product.css, bloktopmenu.css.

Then i looked at the code layout, and saw that a lot of it looks like it makes sense.

After some surfing and still no luck, I thought posting a question on the forum would be a valid solution^^

 

Hope you can help me, should I make a format on all my files, is this an error or a new style?  And where can i find info on this style?   Looks like it´s just Start; no-space, Next inline; +1 space....but best to be sure.

 

Best Regards,

NB

Link to comment
Share on other sites

Thank you for the fast response.
 
I´ve attached a copy of my global.css file.
In the top i´ve put an example, explaining what i mean by the code spacing thing.
When pressing "Enter" in dreamweaver, you would normally write on line with the next value....it would jump down 1 and out one tab....it still does, but the basic css codes dont fit the line, since they have been spaced using the the "Space" button.

 

Hope u can help.

globalexample.css

Link to comment
Share on other sites

For the layout of a script there are not really prescribed standards you must use. Each developer maintain it as he want. For better usability/human readibility some editors are setting spaces/indent for to identify blocks.

 

But in fact script-layout does not have any effect for machine readibility. The machine reads bit per bit or line per line, independent if the line has spaces before code or not. The layout is only for human readibility. Use that what your editor suggest.

 

for the machine is the same code:

for USER in wuser1 wuser 2; do
useradd -m $USER
echo 12345 | passwd --stdin $USER
grep $USER /etc/passwd
done

OR you write it in one line only, The same apllies for the spaces before.

for USER in wuser1 wuser 2; do useradd -m $USER echo 12345 | passwd --stdin $USER grep $USER /etc/passwd done
Link to comment
Share on other sites

Ok thanks, i´m a bit new to this big a project.

Learned html and css + web in general from my brother and mentor, but this is another level and i´m still a newbie^^

It´s nice to have a forum full of people that don´t mind being a mentor/helper for a few minutes.

 

Best regards,

NB

Link to comment
Share on other sites

×
×
  • Create New...