Jump to content

Victor Ananiev

User
  • Posts

    1,655
  • Joined

  • Last visited

Everything posted by Victor Ananiev

  1. А мне кажется для удобочитаемости разместить в head, все таки это его стандартное место. А почему нельзя к онлоаду привязацо?
  2. <? $db = mysql_connect("localhost","root",""); mysql_select_db("mysql" ,$db); mysql_query("SET NAMES 'utf8'"); mysql_query("SET CHARACTER SET 'utf8'"); $co=34; $cd=10; $sql = mysql_query("SELECT * FROM `help_category` where(parent_category_id='".$co."'and help_category_id='".$cd."')"); echo ("<table border ='1'>"); echo ("<tr><td colspan='2'>Таблица</td></tr>"); while ($abc = mysql_fetch_assoc($sql)) { echo("<tr><td align='center'>".$abc['help_category_id']."</td><td align=\"center\">".$abc['parent_category_id']."</td></tr>"); echo("<tr><td>".$abc['parent_category_id']."</td><td>".$abc['help_category_id']."</td></tr>"); echo("<tr><td colspan='2'>".$abc['name']."</td></tr>"); } echo "</table>"; mysql_close($db); ?> Рабочий пример, только переменные и базы поменяй)
  3. PHP для чайников, ну или что то в этом роде.
  4. ЛОЛ, это было серьезно, я спросил пробовал или нет, тем более попытка не пытка и через and не всегда проходит. Можно на ТЫ)) $sql = mysql_query("SELECT * FROM oo where co='".$co."', cd='".$cd."', db='".$db."'"); - на сколько я понял это имелось ввиду) Да оказалось все таки and: $sql = mysql_query("SELECT * FROM `oo` where(co='".$co."'and cd='".$cd."' and db='".$db."')");
  5. <div style="margin:0 auto"> Ваш Сайт </div> Вроде так. Вот эту статью полезно будет почитать: http://htmlbook.ru/faq/?a=64, там все расписано))
  6. а в чем проблема? создаем див от начала до конца страницы, и даем ему margin:0 auto;
  7. Если все таки нужна резина, вот резиновый блок, для ИЕ, абсолют и через хак. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <title>Untitled Document</title> <style> body { margin:20px; padding:0; font-family:Arial, Verdana, Tahoma, "Times New Roman"; } .link_block { text-decoration:none; color:#999; } .block { height:189px; width:50%; color:#999; min-width:300px; _width:400px; cursor:pointer; } .block_left { width:11px; height:100%; float:left; } .block_left IMG, .block_right IMG { border:0; } .block_center { width:80%; float:left; background-color:#eee; border-top:1px solid #999; border-bottom:1px solid #999; } .block_center_top { height:15px; margin-bottom:3px; } .block_center_top_left { width:30%; height:100%; float:left; text-align:center; font-size:14px; font-weight:bold; } .block_center_top_right { text-align:right; width:70%; height:100%; float:left; } .block_center_bottom { height:169px; _height:152px; } .block_center_bottom_left { height:100%; width:30%; float:left; } .block_center_bottom_left IMG { height:75%; _height:60%; width:90%; margin:0 auto; background-color:#999; padding:4px; } .block_center_bottom_right { height:100%; width:70%; float:left; } .block_center_bottom_right_text { width:90%; margin:0 auto; height:100%; text-align:justify; font-size:12px; overflow:auto; } .link_block:hover .block_center_bottom_right_text { text-decoration:underline; } .block_right { float:left; width:11px; height:100%; } </style> </head> <body> <a class="link_block" href="#"> <div class="block"> <div class="block_left"><img src="/img/newsblock/left.gif" /></div> <div class="block_center"> <div class="block_center_top"> <div class="block_center_top_left">Lorem Ipsum Dol...</div> <div class="block_center_top_right">12.03.2009 14:30</div> </div> <div class="block_center_bottom"> <div class="block_center_bottom_left"><img src="/img/avatar15.jpg" /></div> <div class="block_center_bottom_right"><div class="block_center_bottom_right_text">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi tortor. Quisque adipiscing. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</div></div> </div> </div> <div class="block_right"><img src="/img/newsblock/right.gif" /></div> </div> </a> </body> </html>
  8. Если нет времени то по чуть-чуть. ИМХО
  9. Не знаю, у меня все так как на скрине, а в каком браузере? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <title>Картинка</title> <style> #main { height:210px; width:1005px; position:relative; margin:0 auto; } #main IMG { display:block; height:100%; width:100%; } #a1 { width:33px; height:210px; float:left; } #a2 { float:left; width:955px; height:210px; } #a21 { width:955px; height:10px; } #a22 { width:955px; height:183px; } #a23 { width:955px; height:17px; } #a3 { width:15px; height:210px; float:left; } </style> </head> <body> <div id="main"> <div id="a1"><img src="http://stars124.narod.ru/1/h1.png" /></div> <div id="a2"> <div id="a21"><img src="http://stars124.narod.ru/1/h1_2.png" /></div> <div id="a22"><img src="http://stars124.narod.ru/1/h2_2.jpg" /></div> <div id="a23"><img src="http://stars124.narod.ru/1/h3_2.png" /></div> </div> <div id="a3"><img src="http://stars124.narod.ru/1/h3.png" /></div> </div> </body> </html> Все подставил, не пашет центральная картинка(в лисе и осле, а в опере все ок), причины не знаю...
  10. +1, тоже так считаю. Тем более я слишком ленив чтобы сидеть и разбиратся с готовым движком, а так написал сам и знаешь все функции, и главное где что подправить)
  11. А через запятую не пробовал?
  12. У мну так: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <title>Картинка</title> <style> #main { height:400px; width:500px; background-color:#FFFF00; position:relative; } #a1 { width:100px; height:400px; background-color:#9966FF; float:left; } #a2 { float:left; width:300px; height:400px; background-color:#99CCFF; } #a21 { width:300px; height:50px; background-color:#FFFFCC; } #a22 { width:300px; height:300px; background-color:#FF9999; } #a23 { width:300px; height:50px; background-color:#33FF00; } #a3 { width:100px; height:400px; background-color:#660000; float:left; } </style> </head> <body> <div id="main"> <div id="a1"> </div> <div id="a2"> <div id="a21"> </div> <div id="a22"> </div> <div id="a23"> </div> </div> <div id="a3"> </div> </div> </body></html> Вместо картинка, а картинке размеры 100%; И так создаем макет по слоям, у нас есть основной слой, в нем три столбца, и в одном из столбцов 3 строки. Им всем(блокам) дем свой id Дальше пользуем float для расположения, и вставляем картинки с размерами, все) вот скрин(Да простит меня Emm):
  13. Вот переделал на блоках, без резины. Не знаю нужна ли резина в этом случае... вот скрин: вот код: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <style> * { margin:0; padding:0; } body { border:0; font-family:Arial, Verdana, Tahoma, Times New Roman; margin:20px; color:#999; } html { border:0; } .block { height:189px; width:500px; background-color:#eee; cursor:pointer; text-decoration:none; } .linker_block { color:#999; border:0; } .block_left { text-align:left; float:left; width:11px; height:189px; background-color:white; } .block_left IMG, .block_right IMG { border:0; } .block_center { border-top:1px solid #999; border-bottom:1px solid #999; float:left; width:478px; height:187px; margin:0 auto; } .block_center_title { text-align:center; float:left; width:170px; height:22px; font-size:18px; font-weight:bold; } .block_center_date { float:right; width:307px; height:22px; text-align:right; } .block_center_prev { float:left; height:165px; width:170px; text-align:center; } .block_center_prev IMG { height:85%; width:90%; background-color:#999; padding:3px; } .block_center_desc { float:right; height:165px; width:307px; font-size:16px; } .block_center_desc_text { width:300px; text-align:justify; margin:0 auto; overflow:auto; } .linker_block:hover .block_center_desc_text { text-decoration:underline; } .block_right { float:right; text-align:left; height:189px; width:11px; background-color:white; } </style> </head> <body> <a class="linker_block" href="#"> <div class="block"> <div class="block_left"><img src="/img/newsblock/left.gif" /></div> <div class="block_center"> <div class="block_center_title">Lorem ipsum dol...</div> <div class="block_center_date">14.02.2009 12:32</div> <div class="block_center_prev"><img src="/img/avatar15.jpg" /></div> <div class="block_center_desc"><div class="block_center_desc_text">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi tortor. Quisque adipiscing. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</div></div> </div> <div class="block_right" align="left"><img src="/img/newsblock/right.gif" /></div> </div> </a> </body> </html>
  14. http://www.helloworld.ru/texts/comp/db/mys...l.htm#selectrec
  15. Везде адреса правильно прописаны? существуют ли вообще картинки, есьт ли ограничения на размер файла на сервере?
  16. Нужно открыть блокнот, а потом сохранить как...—снизу выбрать"Все файлы"—и в имени файла написать .htaccess
  17. Muse, Nikelback, DJ Tiesto, Skye Edwards, Coldplay, Duffy, Esthetic Education, Gavin DeGraw, Morcheeba, Oasis, Placebo, RHCP, Stereophonics, The Fray, The Killers, Бумбокс, Димна Суміш, СКАЙ, Друга Ріка, Norah Jones.
  18. Еще интересует как мне вот эту блочную сборку, выровнять по центру экрана. - margin:0 auto; на счет сбора картинки потерпи, сейчас попробую сделать и выложу план с обьяснением)
  19. Ну давай так, ссылки у тебя под цвет окружающей среды не подходят, либо среду под ссылки, либо ссылки под среду. Согласен, ссылки пд среду лучше, но можно както включить фантазию, и разрисовать все, ну вставить вон какой нить красивый, ободки под фон, и фон самих новостей. ИМХО
  20. Ну не знаю, както мрачно, раскрасить бы его, и тогда интересно было бы)
  21. SELECT * FROM `table` WHERE(`type`='plazma') ORDER BY `id` - вот запрос, вместо `table` ваша таблица вместо plazma - переменная(с выбраным типом) вместо type - название колонки, вместо id - столбец по которому сортировать)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy