A couple of tips for a typesetter, like a knife through butter

05.09.2011
1011

A practical hostess has a whole arsenal of knives in the kitchen for all occasions, just for convenience, I don’t know some of the nuances, you can look for a solution to problems for a long time, it’s like a hostess with a dull knife. Today I offer you a couple of tips for the layout designer, which you should not forget about, they will help you deal with the code more conveniently so that your layout looks good, and it is easier to make it, sometimes even like a knife through butter.

html file.

1) Document encoding, usually utf-8 for Russian-language sites, for the rest windiws-1251;
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
2) The logo in the semantic layout should be text framed in the h1 tag, even if it is made as a picture, it should be hung as a background image. See article /blog/semantichnaya-verstka-logotipa-na-sajte 3) Don't forget to check for validation errors. 4) It is better to make blocks through class rather than id, unless you are sure that there will be no repeated id="name" in the future. 5) Conveniently divide the site into blocks (header, sidebar, posts, widgets, footer), so that in the future it will be convenient for the programmer to write modules or components for these blocks. 6) Make menus and various elements (depending on the design) lists, which is semantically and conveniently.

css - styles.

1) In blocks with floating height (there may be more content in the block), set the property overflow: hidden; which will clear your float or display:inline elements inside the floating height block.
#box { overflow: hidden; width: 247px; }
2) Limit the maximum width of photos in articles so that if there is a large photo, it does not go beyond the width of the block.
.post img { max-width: 400px; }
3) use css3, of course it doesn't work in ie but if it doesn't affect the design a lot then it's worth it.

Last in our blog

Internet Marketing
04.11.2019