Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mislz28/public_html/wp-content/themes/css-faq-v2/timeweather/timeweather.php on line 19
8 May 2008

forum

Current User: Guest Login Register
Please consider registering

Search 
Search Forums:


 




src свойство элемента img через css?

UserPost

5:48 pm
June 17, 2008


user one

Member

posts 10

1

Можно ли с помощью css задать src свойство элемента img?


ко всем HTML страницам подключить один CSS и в одном месте месте меняем адрес картинки. Возможно?

5:50 pm
June 17, 2008


genius

Member

posts 47

2

эту задачу решаю обычно следующим путём


<html>
<head>
<style type=”text/css”>>
.image{
padding-left:15px; /* отступ от маркера */
background:url(Безымянный.JPG) no-repeat left | center; /* задаем фон */
}
</style>
</head>
<body>
….
….
<table width=”470″ height=”254″ class=”image”>
<tr>
<td> </td></tr></table>
</body>
</html>

left | center; вставлять для того, чтоб разместить левый верхний угол, или центр рисунка. А в ячейку, наверное, лучше добавить неразрывный пробел.



Reply to Topic: src свойство элемента img через css?

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 6 + 2        (Required)

Topic Reply:


 

About the CSS-FAQ forum

Currently Online:

2 Guests

Maximum Online: 20

Forums:

Groups: 3

Forums: 18

Topics: 397

Posts: 834

Members:

There are 1050 members

There are 1 guests

Top Posters:

abc - 57

genius - 47

shane - 46

glowlite.uk - 39

booster - 37

warren - 35

Administrator: admin | Moderators: admin


© Simple:Press Forum - Version 3.1.1 (Build 336)