Изглед на новини промяна

Gamerz

Registered
Някой може ли да ми каже какво да променя в кода си за да ми изглеждат новините по този начин:
Снимка от ляво и около нея текст който да е по-голям защото се га е много малко превюто на новината. Снимката да е с размер по мой избор от кода и текста около нея да си е със същия шрифт. Не можах да се справя и за това питам тук.

Код:
<?php
			include($_SERVER['DOCUMENT_ROOT']."/inc/my_pagina_class.php");

			$test = new MyPagina;
		
			$test->sql = "SELECT * FROM news ORDER BY id DESC"; // the (basic) sql statement (use the SQL whatever you like)
			$result = $test->get_page_result(); // result set
			$num_rows = $test->get_page_num_rows(); // number of records in result set 
			$nav_links = $test->navigation(" | ", "page"); // the navigation links (define a CSS class selector for the current link)
			$nav_info = $test->page_info("to"); // information about the number of records on page ("to" is the text between the number)
			$simple_nav_links = $test->back_forward_link(); // the navigation with only the back and forward links
			$total_recs = $test->get_total_rows(); // the total number of records
			
			function short($content) {
			
				$position=500; // Define how many characters you want to display.
				$content_short = substr($content,$position,1); // Find what is the last character displaying. We find it by getting only last one character from your display message.
				if($content_short !=" ")
				{
					while($content_short !=" ")
					{
						$i=1;
						$position=$position+$i;
						$content_short= substr($content,$position,1);
					}
				}
				$content_short = substr($content,0,$position); // Display your message
				return $content_short;
			}
			
			if(isset($getid)) {
				$sql4 = "SELECT * FROM news WHERE id = $getid";
				$query4 = mysql_query($sql4);
				$res = mysql_fetch_assoc($query4);
				
				$content = $res['content'];
				$title = $res['title'];
				$time = $res['time'];
				$id = $res['id'];
				
				echo '
					
						<div class="new">
							<div class="new_shape">
								<div class="new_shape_left"></div>
								<div class="new_shape_center"><div style="margin:4 0 0 2; float:left;" >'.$title.'</div><div style="margin:10 2 0 0; float:right; font:10px Tahoma; font-weight:bold; color:#ccc;" >Публикувано на '.$time.'</div></div>
								<div class="new_shape_right"></div>
							</div>
							<div class="new_cont">
							<div  style="margin:0 0 0 5; margin*:0 0 0 0; width:770px; text-align:left; font:12px Tahoma; font-weight:bold; color:#666;">'.$content.'</div><br/>
								<a class="new_a" href="news.php">» Обратно</a>
							</div>
							<div class="new_fthr"></div>
						</div>
					
				';
				?>
 

Back
Горе