Форум программистов
 

Восстановите пароль или Зарегистрируйтесь на форуме, о проблемах и с заказом рекламы пишите сюда - alarforum@yandex.ru, проверяйте папку спам!

Вернуться   Форум программистов > Web программирование > HTML и CSS
Регистрация

Восстановить пароль
Повторная активизация e-mail

Купить рекламу на форуме - 42 тыс руб за месяц

Ответ
 
Опции темы Поиск в этой теме
Старый 01.12.2013, 18:35   #1
lenafrolova
 
Регистрация: 26.06.2013
Сообщений: 5
По умолчанию html страничку в css

Добрый день! Я сейчас только учусь css и не могу вникнуть в парочку моментов. Подскажите пожалуйста.

Если код html
Код HTML:
<div align="left">
 <p align="justify"> <font face="Georgia, Times New Roman, Times, serif" color="#00FF00"><strong><img src="Grizzly_D.jpg" alt="1" width="200" height="138" align="left" border="2">Description </strong></font>- Grizzly Bears reach weights of 300-1500 pounds. The coat <i><b><u>color</u></b></i> ranges from shades of blond, brown, black or a combination of these; the long outer guard hairs <i><b><u>are</u></b></i> often tipped with white or silver giving it a grizzled appearance hence the name. The grizzly has a large humpover the shoulders <i><b><u>which is</u></b></i> a muscle mass used to power the forelimbs in digging. The head is large and roundwith a concave facial profile. They sleep in nests they make in trees or on the ground. They        live alone most of the time. Females have 1,        2 or 3 cubs at a time. Tiny cubs sometimes ride on their mother's        back.</p>
  
 
 
 <p align="justify"><font face="Georgia, Times New Roman, Times, serif" color="#00FF00"><strong><img src="grizzlybear2sm.jpg" alt="2" width="200" height="138" align="left" border="2">Distribution</strong></font> - In BC Grizzly Bears inhabit most of the province  except Vancouver Island, the <font color="#0000CC" size="+1">Queen Charlotte Islands</font> and the lower mainland. They climb trees        very well. They are awake at night and sleep in the daytime.        They sleep in nests they make in trees or on the ground. They        live alone most of the time. <font color="#0000CC" size="+1">Females have 1,        2 or 3 cubs at a time.</font> Tiny cubs sometimes ride on their mother's        back. Asiatic black bears        live in forests high up on mountains in many parts of Asia, such </p>
</div>
тогда css писаться будет следующим образом


Код:
div {
text-align: left;
}
 
 
p {
text-align: justify;
font-style: italic;
font-weight: bold;
text-decoration: underline;
 
}
 
font, strong {
font-family: Georgia, 'Times New Roman', Times, serif;
color: 00FF00;
}
 
img {
width: 200px;
height: 138px;
float: left;
vertical-align: top;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 2px;
border-left-width: 2px;
}
и вот как правильно написать если таблица


Код HTML:
<table cellspacing="5" cellpadding="5" bgcolor="#CCFF66" >
  <tr>
    <td bgcolor="#006600" width="50%"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1" color="#999999"><strong>Grizzly Bear Ecology</strong></font></td><td>&nbsp;</td>
  </tr>
  <tr>
    <td width="50%"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1" color="#999999">Bears  are the largest land based carnivores on the planet. However, due to  their varied diet they are better characterized as omnivores.  The remainder is roots, herbs, berries, and insects.
      <p align="justify">Locally,  grizzlies make extensive use of avalanche chutes in search of foods  such as sedges, grasses, cow parsnip and various bulb producing  flowers. <font color="#FF0066"><strike>Aided by their</strike></font> long front claws and massive shoulder muscles,  <font color="#FF0066"><strike>they rototill beds</strike></font> of glacier lilies and spring beauty to harvest  nutritious bulbs and they excavate fat and protein rich Columbian  ground squirrels from their burrows. In mid-summer, grizzlies often  move to huckleberry patches in burned over forests to fatten on a diet  rich in carbohydrates to prepare for winter.</p>
       
    </font></td><td><font face="Verdana, Arial, Helvetica, sans-serif" size="-1" color="#999999">  <p align="justify">Bears  are opportunists, always looking for something to eat. They protect  prime sources of food and can be aggressive towards perceived  competitors. <font color="#FF0066"><strike>Because they</strike></font> hibernate for half the year, bears have to  eat enough in six months to last the whole year. Stores of body fat are  especially crucial for nursing grizzlies. Females give birth to one to  three cubs in early February while still in their winter dens and must  wait <font color="#FF0066"><strike>three more months</strike></font> before they can emerge and eat again. Males are  usually intolerant of other bears except at mating time.</p>
      <p align="justify">Protein  rich foods are not abundant in the Columbia Mountains. Deep snow limits  ungulate numbers and available carcasses. Dams built on the Columbia  River in the 1930's eliminated autumn salmon runs. Berry plants are  most productive in old burned areas but the control of forest fires has  reduced the extent of these patches.
        &nbsp;</p></font></td>
  </tr>
</table>


Подскажите пожалуйста . Заранее спасибо
lenafrolova вне форума Ответить с цитированием
Старый 02.12.2013, 11:52   #2
Naive
Раздолбайских Дел
Старожил
 
Аватар для Naive
 
Регистрация: 22.05.2009
Сообщений: 3,828
По умолчанию

А что вы, собственно, сделать то собираетесь?
т.е. показали кусок разметки в стиле html3.2, дубль в css атрибутов этой разметки и таблицу, ок... а нам что с этим делать то?)
Я могу сказать только что у вас ошибка в задании цвета в css, 16-ричный код цвета должен начинаться с решетки. И рамка в том же css не применится, т.к. нужно задать хотябы стиль:
Код:
border: 2px solid;
Alar, верни репу!
Naive вне форума Ответить с цитированием
Ответ


Купить рекламу на форуме - 42 тыс руб за месяц

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск


Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Меню на HTml/CSS МОЛЛь HTML и CSS 1 27.05.2013 13:16
Мozilla неправильно отображает мою страничку. Html Екатерина_21 HTML и CSS 5 04.08.2011 21:05
html/css классы... DrStrangeLove HTML и CSS 3 19.09.2010 22:03
Как пропарсив HTML страничку занести результат тегов <span></span> в label? Ramal Работа с сетью в Delphi 4 27.10.2009 03:54
Как из Delphi открыть страничку html doncova1 Общие вопросы Delphi 5 16.03.2008 14:39