Introducere css in codul html

Vezi subiectul anterior Vezi subiectul urmator In jos

Rezolvat Introducere css in codul html

Mesaj Scris de pconstantinedyyy la data de Dum 28 Aug - 15:23

Salut am acest cod
Cod:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link type="text/css" href="1.css" rel="stylesheet" media="screen" />
<title>No.1 :: CSS Template :: XTML 1.0 Transitional</title>
<link rel="shortcut icon" href="http://monorom.com/favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div id="container">
   <div id="banner" ><a href="http://www.intensivstation.ch"><img src="http://www.intensivstation.ch/files/images/monorom_css_logo.gif" alt="" width="414" height="56" border="0" /></a>
       <h1>service for a better code</h1>
   </div>
   <div id="left">
      <h2>Menu left</h2>
      <pre>
#left {
float: left;
width: 200px;
margin: 0px;
padding: 0px;
}
</pre>
<p><a href="http://validator.w3.org/check?uri=http%3A%2F%2Fintensivstation.ch%2Ffiles%2Ftemplates%2F2%2Ftemplate-1.html"><img src="http://www.intensivstation.ch/files/images/buttons/xhtml10.gif" alt="" width="80" height="15" border="0"/></a><br/>
<a href="http://www.monorom.com"><img src="http://www.intensivstation.ch/files/images/buttons/monorom_button.gif" alt="monorom" width="80" height="15" border="0"/></a>

<!-- Creative Commons License -->
<a rel="license" href="http://creativecommons.org/licenses/by/1.0/"><img src="http://www.intensivstation.ch/files/images/buttons/cc.gif" alt="Creative Commons License" width="80" height="15" border="0"/></a>

This work is licensed under a

<a rel="license" href="http://creativecommons.org/licenses/by/1.0/">Creative Commons License</a>.</p>
   </div>
   <div id="content">
      <h2>Content</h2>
<p>All templates are XHTML 1.0 and CSS2/ tableless.

This Template has been tested on the following Browser:

<b>MAC</b> Safari, Opera6.3 Opera8.5, Mozilla, Firefox, IE

<b>PC:</b> IE 6, Firefox

<b>Linux:</b> Konqueror, Firefox</p>
<p><img src="/files/images/buttons/download.gif" alt="css template" border="0" class="download" /> <a href="/files/en_templates/2/template-1.zip">Dowload Template </a></p>
      <p><b>2 columns /  centered / fixed width</b>

      2 columns layout grid, both columns haben eine fixe Breite und sind centered.

This Layout hat eine minimale Höhe für den <code>content</code> div, so dass Navigation und Inhalt immer gleich lang sind.
</p>
<pre>#container {
width: 800px;
margin-bottom: 10px;
margin-left: auto;
margin-right: auto;
background-color: #ff99cc;}</pre>
<p>The  <code>container</code> div zentriert das Layout und gibt ihm die Breite. The left column gets the backgroundcolor from the <code>container</code> div.</p>
<pre>#content {
background-color: #ffffff;
padding: 0px;
margin-left: 200px;
margin-right: 0px; }

div#content {
min-height:600px;
height:expression(this.scrollHeight > 600 ? "auto":"600px"); }</pre>
<p>The <code>content</code>-div has a left margin. Setting a <code>min-height</code> assures that the content area is always higher than the navigation.</p>

<p>IE on MAC doesn't interprets <code>min-height</code>. The dynamic properties (i.e. <code>expression</code>) used in explorer are proprietary by Microsoft. This prevents the css from validating according to W3C.

«-- <a href="javascript:history.back()">back</a></p>   
   
   </div>
    <div id="footer"><h1>in valid code we trust (*^_^*) miss monorom</h1></div>
</div>
</body>
</html>
Vreau sal introduc intro pagina html problema e ca 1.css trebuie sa fie in acelasi folder cu pagina html, daca inlocuiesc acea cale cu aceasta :link sters nuu apare bine acele meniuri, mai exact acel css nu se incarca.

AM dat search si nu mai exista alte topicuri cu aceasta probelma.

pconstantinedyyy
Membru Forumgratuit

masculin

Mesaje : 11
Varsta : 24
Data de inscriere : 07/05/2011
Multumiri : 0
1 avertisment

http://game-arena.forumers.ro/

Sus In jos

Rezolvat Re: Introducere css in codul html

Mesaj Scris de Zack. la data de Dum 28 Aug - 15:29

Ati primit warn pentru spam. Va rog sa nu mai postati linkuri externe platformei forumgratuit fara acordul unui membru al staff-ului. Multumesc pentru intelegere!

Css se poate introduce in html prin intermediul tagurilor
Cod:
<style>cod css</style>

Zack.
Membru onorific
Membru onorific

masculin

Mesaje : 4849
Localizare : Sibiu
Data de inscriere : 24/06/2010
Multumiri : 0
Niciun avertisment

Sus In jos

Rezolvat Re: Introducere css in codul html

Mesaj Scris de pconstantinedyyy la data de Dum 28 Aug - 15:33

Deci in loc de aceasta linie
Cod:
<link type="text/css" href="1.css"
Introduc <style>ce este scris in 1.css</style>

?

pconstantinedyyy
Membru Forumgratuit

masculin

Mesaje : 11
Varsta : 24
Data de inscriere : 07/05/2011
Multumiri : 0
1 avertisment

http://game-arena.forumers.ro/

Sus In jos

Rezolvat Re: Introducere css in codul html

Mesaj Scris de Gassy la data de Dum 28 Aug - 15:35

Exact, uite un exemplu:
Cod:

<style>
body{
background-color: white;
color: black;
}

.class{
border: 1px solid #aaa;
}
</style>

Important este insa, ca tag-urile <style> sa intre in <head> A face cu ochiul

Gassy
Membru activ

masculin

Mesaje : 1255
Varsta : 21
Localizare : Forumgratuit!
Data de inscriere : 11/08/2011
Multumiri : 0
Membru exclus

Sus In jos

Rezolvat Re: Introducere css in codul html

Mesaj Scris de pconstantinedyyy la data de Dum 28 Aug - 15:35

Multumesc Gassy esti cel mai tare.
Puteti pune rezolvat.

pconstantinedyyy
Membru Forumgratuit

masculin

Mesaje : 11
Varsta : 24
Data de inscriere : 07/05/2011
Multumiri : 0
1 avertisment

http://game-arena.forumers.ro/

Sus In jos

Rezolvat Re: Introducere css in codul html

Mesaj Scris de Gassy la data de Dum 28 Aug - 15:36

Foarte fericit Multi imi spun asta,
Cu placere... A face cu ochiul
Insa si DarkStar te-a informat cu ceva Fericit

Gassy
Membru activ

masculin

Mesaje : 1255
Varsta : 21
Localizare : Forumgratuit!
Data de inscriere : 11/08/2011
Multumiri : 0
Membru exclus

Sus In jos

Rezolvat Re: Introducere css in codul html

Mesaj Scris de Zack. la data de Dum 28 Aug - 15:43

topic rezolvat

Zack.
Membru onorific
Membru onorific

masculin

Mesaje : 4849
Localizare : Sibiu
Data de inscriere : 24/06/2010
Multumiri : 0
Niciun avertisment

Sus In jos

Vezi subiectul anterior Vezi subiectul urmator Sus

- Subiecte similare

Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum