thiết kế giao diện wordpress phần 6
Số trang: 24
Loại file: pdf
Dung lượng: 1.63 MB
Lượt xem: 10
Lượt tải: 0
Xem trước 3 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Tham khảo tài liệu thiết kế giao diện wordpress phần 6, công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Nội dung trích xuất từ tài liệu:
thiết kế giao diện wordpress phần 6 Chapter 4So, your work-flow really ends up looking something more like this:You want to work with nice, small pieces or chunks of code. I tend to define a chunkin XHTML markup as no more than one div section, the internal markup, and anyWordPress template tags it contains. When working with CSS, I try to only workwith one id or class rule at a time. Sometimes, while working with CSS, Ill break thisdown even further and test after every property I add to a rule, until the rule looks asI intend and validates.As soon as you see something that doesnt look right in your browser, you can checkfor validation and then fix it. The advantage of this work-flow is you know exactlywhat needs to be fixed and what XHTML markup or PHP code is to blame. All thecode that was looking fine and validating before, you can ignore. The recently addedmarkup and code is also the freshest in your mind, so youre more likely to realizethe solution needed to fix the problem.If you add too many chunks of XHTML markup or several CSS rules before checkingit in your browser, then discover something has gone awry, youll have twice asmuch sleuthing to do in order to discover which (bit or bits) of markup and code areto blame. Again, your fail-safe is your backup. [ 93 ]Debugging and ValidatonYou should be regularly saving backups of your theme at good stable stoppingpoints. If you do discover that you just cant figure out where the issue is, rollingback to your last stable stopping point and starting over might be your best bet togetting back on track.As mentioned in Chapter 2, youll primarily design for FireFox and then apply anyrequired fixes, hacks, and workarounds to IE. You can do that for each piece of codeyou add to your theme. As you can see in the preceding figure, first check yourtheme in FireFox and if theres a problem, fix it for FireFox first. Then, check it in IEand make any adjustments for that browser.At this point, you guessed it, more than half of the debugging process will dependdirectly on your own eyeballs and aesthetics. If it looks the way you intended it tolook and works the way you intended it to work, check that the code validates andmove on. When one of those three things doesnt happen (it doesnt look right, workright, or validate), you have to stop and figure out why.Troubleshooting BasicsSuffice to say, it will usually be obvious when something is wrong with yourWordPress theme. The most common reasons for things being off are: Mis-named, mis-targeted, or inappropriately-sized images. • Markup text or PHP code that affects or breaks the Document Object Model • (DOM) due to being inappropriately placed or having syntax errors in it. WordPress PHP code copied over incorrectly, producing PHP error displays • in your template, rather than content. CSS rules that use incorrect syntax or conflict with later CSS rules. •The first point is pretty obvious when it happens. You see no images, or worse,you might get those little ugly xd boxes in IE if theyre called directly from theWordPress posts or pages. Fortunately, the solution is also obvious: you have to goin and make sure your images are named correctly if youre overwriting standardicons or images from another theme. You also might need to go through your CSSfile and make sure the relative paths to the images are correct.For images that are not appearing correctly because they were mis-sized, you can goback to your image editor, fix them, and then re-export them, or you might be ableto make adjustments in your CSS file to display a height and/or width that is moreappropriate to the image you designed. [ 94 ] Chapter 4 Dont forget about casing! If by some chance you happen to be developing your theme with an installation of WordPress on a local Windows machine, do be careful with the upper and lower casing in your links and image paths. Chances are, the WordPress installation that your theme is going to be installed into is more likely to be on a Unix or Linux web server. For some darn reason, Windows (even if youre running Apache, not IIS) will let you reference and call files with only the correct spelling required. Linux, in addition to spelling, requires the upper and lower casing to be correct. You must be careful to duplicate exact casing when naming images that are going to be replaced and/or when referencing your own image names via CSS. Otherwise, it w ...
Nội dung trích xuất từ tài liệu:
thiết kế giao diện wordpress phần 6 Chapter 4So, your work-flow really ends up looking something more like this:You want to work with nice, small pieces or chunks of code. I tend to define a chunkin XHTML markup as no more than one div section, the internal markup, and anyWordPress template tags it contains. When working with CSS, I try to only workwith one id or class rule at a time. Sometimes, while working with CSS, Ill break thisdown even further and test after every property I add to a rule, until the rule looks asI intend and validates.As soon as you see something that doesnt look right in your browser, you can checkfor validation and then fix it. The advantage of this work-flow is you know exactlywhat needs to be fixed and what XHTML markup or PHP code is to blame. All thecode that was looking fine and validating before, you can ignore. The recently addedmarkup and code is also the freshest in your mind, so youre more likely to realizethe solution needed to fix the problem.If you add too many chunks of XHTML markup or several CSS rules before checkingit in your browser, then discover something has gone awry, youll have twice asmuch sleuthing to do in order to discover which (bit or bits) of markup and code areto blame. Again, your fail-safe is your backup. [ 93 ]Debugging and ValidatonYou should be regularly saving backups of your theme at good stable stoppingpoints. If you do discover that you just cant figure out where the issue is, rollingback to your last stable stopping point and starting over might be your best bet togetting back on track.As mentioned in Chapter 2, youll primarily design for FireFox and then apply anyrequired fixes, hacks, and workarounds to IE. You can do that for each piece of codeyou add to your theme. As you can see in the preceding figure, first check yourtheme in FireFox and if theres a problem, fix it for FireFox first. Then, check it in IEand make any adjustments for that browser.At this point, you guessed it, more than half of the debugging process will dependdirectly on your own eyeballs and aesthetics. If it looks the way you intended it tolook and works the way you intended it to work, check that the code validates andmove on. When one of those three things doesnt happen (it doesnt look right, workright, or validate), you have to stop and figure out why.Troubleshooting BasicsSuffice to say, it will usually be obvious when something is wrong with yourWordPress theme. The most common reasons for things being off are: Mis-named, mis-targeted, or inappropriately-sized images. • Markup text or PHP code that affects or breaks the Document Object Model • (DOM) due to being inappropriately placed or having syntax errors in it. WordPress PHP code copied over incorrectly, producing PHP error displays • in your template, rather than content. CSS rules that use incorrect syntax or conflict with later CSS rules. •The first point is pretty obvious when it happens. You see no images, or worse,you might get those little ugly xd boxes in IE if theyre called directly from theWordPress posts or pages. Fortunately, the solution is also obvious: you have to goin and make sure your images are named correctly if youre overwriting standardicons or images from another theme. You also might need to go through your CSSfile and make sure the relative paths to the images are correct.For images that are not appearing correctly because they were mis-sized, you can goback to your image editor, fix them, and then re-export them, or you might be ableto make adjustments in your CSS file to display a height and/or width that is moreappropriate to the image you designed. [ 94 ] Chapter 4 Dont forget about casing! If by some chance you happen to be developing your theme with an installation of WordPress on a local Windows machine, do be careful with the upper and lower casing in your links and image paths. Chances are, the WordPress installation that your theme is going to be installed into is more likely to be on a Unix or Linux web server. For some darn reason, Windows (even if youre running Apache, not IIS) will let you reference and call files with only the correct spelling required. Linux, in addition to spelling, requires the upper and lower casing to be correct. You must be careful to duplicate exact casing when naming images that are going to be replaced and/or when referencing your own image names via CSS. Otherwise, it w ...
Tìm kiếm theo từ khóa liên quan:
thủ thuật máy tính bí quyết lập trình thiết kế giao diện web thế kế wordpress mẹo tin họcTài liệu liên quan:
-
Top 10 mẹo 'đơn giản nhưng hữu ích' trong nhiếp ảnh
11 trang 319 0 0 -
Làm việc với Read Only Domain Controllers
20 trang 307 0 0 -
Sửa lỗi các chức năng quan trọng của Win với ReEnable 2.0 Portable Edition
5 trang 216 0 0 -
Giáo trình Bảo trì hệ thống và cài đặt phần mềm
68 trang 209 0 0 -
Tổng hợp 30 lỗi thương gặp cho những bạn mới sử dụng máy tính
9 trang 206 0 0 -
Phần III: Xử lý sự cố Màn hình xanh
3 trang 206 0 0 -
UltraISO chương trình ghi đĩa, tạo ổ đĩa ảo nhỏ gọn
10 trang 204 0 0 -
Sao lưu dữ liệu Gmail sử dụng chế độ Offline
8 trang 203 0 0 -
Hướng dẫn cách khắc phục lỗi màn hình xanh trong windows
7 trang 202 0 0 -
Giáo Trình tin học căn bản - ĐH Marketing
166 trang 198 0 0