What's new

reading css

findtim

Top Contributor
how do people like to read thier css? this is my WP sites.

like this:

#nav li a{ color:#fff; display:block; font-size:18px; font-weight:bold; margin:0; padding:8px 18px; position:relative; text-decoration:none}

or this:

#nav li a{
color:#fff;
display:block;
font-size:18px;
font-weight:bold;
margin:0;
padding:8px 18px;
position:relative;
text-decoration:none
}


any other ways?

and also i find if i cut and paste the css out, then put it back in i end up with row gaps, anyone know a quick way to fix that? i've tried a few with no luck.
eg:
#nav li a{


color:#fff;


display:block;


font-size:18px;


font-weight:bold;


margin:0;


padding:8px 18px;


position:relative;


text-decoration:none


}
 

johno69

Top Contributor
Obviously your second way is nicer to read.

Wordpress has a bad habit of adding blank lines in many files.

If you use Dreamweaver there's a tool that fixes it with one click.

You should really minify the code really anyway. Can't say I do though.
 

FirstPageResults

Top Contributor
I prefer single line too. I like to indent the non minified code:

Code:
ul {}
  ul li { }
     ul li a { }

And then minify before deployment.

Some IDEs can reformat your code to you liking when you paste, which is handy for those with code OCD!
 

Community sponsors

Domain Parking Manager

AddMe Reputation Management

Digital Marketing Experts

Catch Expired Domains

Web Hosting

Members online

No members online now.

Forum statistics

Threads
11,106
Messages
92,075
Members
2,394
Latest member
Spacemo
Top