русс | укр

Языки программирования

ПаскальСиАссемблерJavaMatlabPhpHtmlJavaScriptCSSC#DelphiТурбо Пролог

Компьютерные сетиСистемное программное обеспечениеИнформационные технологииПрограммирование

Все о программировании


Linux Unix Алгоритмические языки Аналоговые и гибридные вычислительные устройства Архитектура микроконтроллеров Введение в разработку распределенных информационных систем Введение в численные методы Дискретная математика Информационное обслуживание пользователей Информация и моделирование в управлении производством Компьютерная графика Математическое и компьютерное моделирование Моделирование Нейрокомпьютеры Проектирование программ диагностики компьютерных систем и сетей Проектирование системных программ Системы счисления Теория статистики Теория оптимизации Уроки AutoCAD 3D Уроки базы данных Access Уроки Orcad Цифровые автоматы Шпаргалки по компьютеру Шпаргалки по программированию Экспертные системы Элементы теории информации

The Center Command


Дата добавления: 2015-07-09; просмотров: 504; Нарушение авторских прав


The next command that we will explore is the command used to center items on a web page. This command can be very useful if you want to put images or text at the top of your page, or anything for that manner, that you want centered. The good thing about the center command is that if a person is visiting your page and they have a 21” monitor set to 1024x768 pixels, with their web browser window maximized, they will still see the centered items in the center of the screen. If you did not center the items they would be at the left hand side of the screen and, if they are small, they will not be very catching to the eye. On my front web page I have everything centered. I like this because I have text then a picture then more text on the same line and if I did not center the items they would not line up correctly and make the entire page look or poor quality.

Let’s say you decide that your page would look much better with a centered banner of your favorite web browser on it. Since my favorite web browser is Netscape, I will use it in my example. Let’s say you find a nice banner that advertises the Netscape web browser and since your page looks its best with netscape you decide that you should put that banner on your page. For now we will call the banner netscape.gif. The first thing that you would do would be to enter the beginning center command. That command is an angle bracket “<“ followed by the word CENTER followed by an angle bracket “>”. Then you would enter the item that you want centered. Let’s say that you want a link to netscape through the banner so you would enter the A HREF command and the IMG SRC command. Then you would tell the browser that you do not want anything following that centered. To do this the command is a cart “<“ followed by a slash “/” followed by the word CENTER followed by an angle bracket “>”. The final source code to do this would look like this:



 

<CENTER><A HREF=”http://home.netscape.com”><IMG SRC=”netscape.gif”></A></CENTER>

 

I had also mentioned that there was a way to center more then one item. Well instead of entering the center and uncenter command for every item that you want centered. This could be a long and tedious process. You could, if all the items that you want centered follow one another, just enter the center command once and enter the uncenter command at the end of the items that you wish to be centered. If you wanted the netscape banner and the text under it to be centered, and that the text reads “Click on the banner to download netscape”, you could do that. Of course to put the two items on two different lines you would have to insert a break command. The final source code for this document would look like this:

 

<CENTER><A HREF=”http://home.netscape.com”><IMG SRC=”netscape.gif”></A>

<BR>



<== предыдущая лекция | следующая лекция ==>
The Break Command | The Heading Command


Карта сайта Карта сайта укр


Уроки php mysql Программирование

Онлайн система счисления Калькулятор онлайн обычный Инженерный калькулятор онлайн Замена русских букв на английские для вебмастеров Замена русских букв на английские

Аппаратное и программное обеспечение Графика и компьютерная сфера Интегрированная геоинформационная система Интернет Компьютер Комплектующие компьютера Лекции Методы и средства измерений неэлектрических величин Обслуживание компьютерных и периферийных устройств Операционные системы Параллельное программирование Проектирование электронных средств Периферийные устройства Полезные ресурсы для программистов Программы для программистов Статьи для программистов Cтруктура и организация данных


 


Не нашли то, что искали? Google вам в помощь!

 
 

© life-prog.ru При использовании материалов прямая ссылка на сайт обязательна.

Генерация страницы за: 0.755 сек.