Gå til innhold

CuteNews; Skifte skrift farge?


Gjest medlem-77217

Anbefalte innlegg

Videoannonse
Annonse
Da spør jeg igjen....

5748685[/snapback]

hehe :)

lag en fil som du ender på .css. (f.eks. style.css).

inne i <head>-taggen i html-dokumentet (den siden hvor du inkluderer cutenews/news.txt) legger du inn følgende kode:

<link rel="stylesheet" type="text/css" href="/mappe/style.css" />

med css kan du gjøre uhyre mye rart, bl.a. endre teksfarge. Se bl.a. htmldog og w3school.

 

taggen <div class="rød_tekst"> skal omslutte den teksten som du ønsker skal være rød. (bytt gjerne ut "rød_tekst" til et helt annet navn, i mitt forrige innlegg brukte jeg bare "tekst"). Poenget er at i css-dokumentet angir du egentskapene til alt som står inne i "rød-tekst". Det gjør du ved å skrive følgende i style.css-dokumentet:

.rød-tekst{
 color:#FF0000;
}

du kan legge til flere atributter også, titt på vedlagte linker ;)

 

NB: husk å avslutte div-taggen. Sett altså inn </div> etter at du er ferdig med den delen av html-dokumentet som skal være rød/grønn/venstrejustert/etc..

 

Siden det her er snakk om å endre skriftegenskaper i forhold til cutenews ville jeg lagt til følgende på default-template: <div class="ettellerannet"> før {full-story} og </div> rett etter. (og det samme i short-story). I tilleg ville jeg sett etter om det står noen ting om color i de forhåndsdefinerte <style>-tagene. I såfall: ta bort "color:#ettellerannet;" men la resten stå.

 

(Det som står inne i <style> er også css-koder, men jeg foretrekker å ha et egent dokument for all css-kode. Blir mye mer oversiktlig sånn.)

Lenke til kommentar

evt bare

body {
color: #ff0000;
}

 

(skifter farge på all skrifta hvor annen farge ikke er oppgitt)

 

Lær deg grunnleggende CSS først som sist -- så letter du arbeidet ditt betraktelig

Endret av Mikka
Lenke til kommentar

Kontrollert koden om at det ikke er dobbelt opp med "<"? Kan hende det står "<<" eller at du har en "<" som står utenfor apostrofen. Forklare med litt kode...

 

Slik kan/skal det se ut:

echo "<strong>Her er det noe tekst</strong>";

Slik kan feilen være:

echo <"strong>Her er det noe tekst</strong>";

Lenke til kommentar

tok en titt på kildekoden for sia:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML> 

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>guides</title>
<meta name="GENERATOR" content="Virtual Mechanics WebDwarf V2 250f ">
<meta http-equiv="imagetoolbar" content="false">

<style type="text/css">
.fsx01 {font-size: 11px;}
.fsx02 {font-size: 12px;}
.fsx03 {font-size: 13px;}
.fsx04 {font-size: 15px;}
.fsx05 {font-size: 16px;}
.fsx06 {font-size: 19px;}
.fsx07 {font-size: 21px;}
.fsx08 {font-size: 24px;}
.fsx09 {font-size: 27px;}
.fsx10 {font-size: 29px;}
.fsx11 {font-size: 32px;}
.fsx12 {font-size: 35px;}
.fsx13 {font-size: 37px;}
.fsx14 {font-size: 48px;}
.fsx15 {font-size: 64px;}
.fsx16 {font-size: 96px;}
.txdec {text-decoration: none;}

<link rel="stylesheet" type="text/css" href="cutenews/skins/rss_style.css" />
.dfltt {font-family:Times New Roman;font-size:14px;font-weight:normal;text-decoration:none;text-align:left;}
body {margin:0;height:100%;width:100%;}
</style>
</head> 
<body bgcolor="#ffffff" alink="#FF0000" link="#0000FF" vlink="#800080" background="Template 1/bg.jpg" >

<div id="Oobj11" style="position:absolute;z-index:1;visibility:visible; left:290px;top:240px;width:696px;height:680px;font-size:1px;">
<img name="Ggeo11" SRC="./geometry/obj11geo11pg1p14.gif" alt="" border = 0  width="696" height="680"></div>

<div id="Oobj7" style="position:absolute;z-index:2;visibility:visible; left:30px;top:640px;width:208px;height:241px;font-size:1px;">
<img name="Ggeo17" Align=Top SRC="Template 1/smallbox.GIF" alt="" border=0 width="208" height="241"></div>

<div id="Oobj20" style="position:absolute;z-index:3;visibility:visible; left:300px;top:260px;width:400px;height:92px;">
<div id="Grtf20" class="dfltt">
<font face="Folkard" class="fsx14" color="#ffffff">News<br></font></div>
</div>

<div id="Oobj24" style="position:absolute;z-index:4;visibility:visible; left:40px;top:650px;width:400px;height:80px;">
<div id="Grtf24" class="dfltt">
<font face="Folkard" class="fsx11" color="#ffffff"><B>Announce<br></B></font></div>
</div>

<div id="Oobj27" style="position:absolute;z-index:5;visibility:visible; left:30px;top:200px;width:208px;height:427px;font-size:1px;">
<img name="Ggeo27" Align=Top SRC="Template 1/mediumbox.GIF" alt="" border=0 width="208" height="427"></div>

<div id="Oobj28" style="position:absolute;z-index:6;visibility:visible; left:-51px;top:-51px;width:52px;height:52px;font-size:1px;">
<img name="Ggeo28" SRC="./geometry/obj28geo28pg1p14.png" alt="" border = 0  width="52" height="52"></div>

<div id="Oobj29" style="position:absolute;z-index:7;visibility:visible; left:40px;top:210px;width:400px;height:72px;">
<div id="Grtf29" class="dfltt">
<font face="Folkard" class="fsx11" color="#ffffff">Menu<br></font></div>
</div>

<div id="Oobj31" style="position:absolute;z-index:8;visibility:visible; left:83px;top:627px;width:70px;height:13px;font-size:1px;">
<img name="Ggeo31" Align=Top SRC="Template 1/ftile_back.gif" alt="" border=0 width="70" height="13"></div>

<div id="Oobj37" style="position:absolute;z-index:9;visibility:visible; left:29px;top:892px;width:208px;height:241px;font-size:1px;">
<img name="Ggeo37" Align=Top SRC="Template 1/smallbox.GIF" alt="" border=0 width="208" height="241"></div>

<div id="Oobj39" style="position:absolute;z-index:10;visibility:visible; left:290px;top:930px;width:696px;height:607px;font-size:1px;">
<img name="Ggeo39" Align=Top SRC="Template 1/box.GIF" alt="" border=0 width="696" height="607"></div>

<div id="Oobj40" style="position:absolute;z-index:11;visibility:visible; left:40px;top:910px;width:400px;height:72px;">
<div id="Grtf40" class="dfltt">
<font face="Folkard" class="fsx11" color="#ffffff">Latest News<br></font></div>
</div>

<div id="Oobj41" style="position:absolute;z-index:12;visibility:visible; left:310px;top:390px;width:630px;height:511px;">
<div id="Gcode41" class="dfltt">
<div style="width:420px; margin-bottom:30px;">
<div><strong>Site under construction!</strong></div>

<div style="text-align:justify; padding:3px; margin-top:3px; margin-bottom:5px; border-top:1px solid #D3D3D3;">Hello! 


Site is currently under construction! 
Please come visit us as soon as you can!

Wowaholic team.</div>

<div style="float: right;"><!-- no full story-->  <a href="/index.php?subaction=showcomments&id=1142276888&archive=&start_from=&ucat=1&">0 Comments</a></div>

<div><em>Posted on 13 Mar 2006 by <a href="mailto:[email protected]">Busee</a></em></div>
</div><div style="margin-top:15px;width:100%;text-align:center;font:9px Verdana;">Content Management Powered by <a href="http://cutephp.com/" title="CuteNews - PHP News Management System">CuteNews</a></div><!-- News Powered by CuteNews: http://cutephp.com/ --> 
</div>
</div>

<div id="Oobj42" style="position:absolute;z-index:13;visibility:visible; left:50px;top:290px;width:400px;height:18px;">
<a href="http://www.wowaholics.net/"><font face="Tahoma" class="fsx01" color="#ffffff"><B>Home<br></B></font></a>
</div>

<div id="Oobj43" style="position:absolute;z-index:14;visibility:visible; left:50px;top:310px;width:400px;height:17px;">
<a href="http://www.wowaholics.net/news.php"><font face="Tahoma" class="fsx01" color="#ffffff"><B>News<br></B></font></a>
</div>

<div id="Oobj44" style="position:absolute;z-index:15;visibility:visible; left:50px;top:330px;width:400px;height:17px;">
<a href="http://www.wowaholics.net/archive.php"><font face="Tahoma" class="fsx01" color="#ffffff"><B>Archive<br></B></font></a>
</div>

<div id="Oobj45" style="position:absolute;z-index:16;visibility:visible; left:50px;top:370px;width:400px;height:17px;">
<a href="http://wowaholics.net/forum/"><font face="Tahoma" class="fsx01" color="#ffffff"><B>Forum<br></B></font></a>
</div>

<div id="Oobj46" style="position:absolute;z-index:17;visibility:visible; left:80px;top:430px;width:400px;height:17px;">
<a href="http://wowaholics.net/forum/index.php?showforum=2"><font face="Tahoma" class="fsx01" color="#ffffff">Off-Topic<br></font></a>
</div>

<div id="Oobj47" style="position:absolute;z-index:18;visibility:visible; left:60px;top:400px;width:400px;height:17px;">
<a href="http://wowaholics.net/forum/index.php?c=1"><font face="Tahoma" class="fsx01" color="#ffffff"><B>Wowaholics<br></B></font></a>
</div>

<div id="Oobj48" style="position:absolute;z-index:19;visibility:visible; left:-51px;top:-51px;width:52px;height:52px;font-size:1px;">
<img name="Ggeo48" SRC="./geometry/obj48geo48pg1p14.png" alt="" border = 0  width="52" height="52"></div>

<div id="Oobj49" style="position:absolute;z-index:20;visibility:visible; left:80px;top:450px;width:400px;height:17px;">
<a href="http://wowaholics.net/forum/index.php?showforum=3"><font face="Tahoma" class="fsx01" color="#ffffff">Info & News<br></font></a>
</div>

<div id="Oobj50" style="position:absolute;z-index:21;visibility:visible; left:60px;top:510px;width:400px;height:17px;">
<a href="http://wowaholics.net/forum/index.php?c=2"><font face="Tahoma" class="fsx01" color="#ffffff"><B>Generelly<br></B></font></a>
</div>

<div id="Oobj51" style="position:absolute;z-index:22;visibility:visible; left:80px;top:540px;width:400px;height:17px;">
<a href="http://wowaholics.net/forum/index.php?showforum=6"><font face="Tahoma" class="fsx01" color="#ffffff">Guild Chat<br></font></a>
</div>

<div id="Oobj52" style="position:absolute;z-index:23;visibility:visible; left:80px;top:470px;width:400px;height:17px;">
<a href="http://wowaholics.net/forum/index.php?showforum=4"><font face="Tahoma" class="fsx01" color="#ffffff">Technical Problems?<br></font></a>
</div>

<div id="Oobj53" style="position:absolute;z-index:24;visibility:visible; left:80px;top:490px;width:400px;height:17px;">
<a href="http://wowaholics.net/forum/index.php?showforum=5"><font face="Tahoma" class="fsx01" color="#ffffff">Suggestions?<br></font></a>
</div>

<div id="Oobj54" style="position:absolute;z-index:25;visibility:visible; left:80px;top:560px;width:400px;height:17px;">
<a href="http://wowaholics.net/forum/index.php?showforum=7"><font face="Tahoma" class="fsx01" color="#ffffff">Class forum<br></font></a>
</div>

<div id="Oobj55" style="position:absolute;z-index:26;visibility:visible; left:80px;top:580px;width:400px;height:17px;">
<a href="http://wowaholics.net/forum/index.php?showforum=8"><font face="Tahoma" class="fsx01" color="#ffffff">Generally<br></font></a>
</div>

<div id="Oobj56" style="position:absolute;z-index:27;visibility:visible; left:80px;top:600px;width:400px;height:17px;">
<a href="http://wowaholics.net/forum/index.php?showforum=9"><font face="Tahoma" class="fsx01" color="#ffffff">UI Customization<br></font></a>
</div>

<div id="Oobj57" style="position:absolute;z-index:28;visibility:visible; left:50px;top:350px;width:400px;height:17px;">
<a href="http://www.wowaholics.net/guides.php"><font face="Tahoma" class="fsx01" color="#ffffff"><B>Guides<br></B></font></a>
</div>

<div id="Oobj64" style="position:absolute;z-index:29;visibility:visible; left:90px;top:880px;width:70px;height:13px;font-size:1px;">
<img name="Ggeo64" Align=Top SRC="Template 1/ftile_back.gif" alt="" border=0 width="70" height="13"></div>

<div id="Oobj66" style="position:absolute;z-index:30;visibility:visible; left:320px;top:200px;width:115px;height:29px;font-size:1px;">
<img name="Ggeo66" Align=Top SRC="Template 1/button.gif" alt="" border=0 width="115" height="29"></div>

<div id="Oobj9" style="position:absolute;z-index:31;visibility:visible; left:440px;top:200px;width:115px;height:29px;font-size:1px;">
<img name="Ggeo67" Align=Top SRC="Template 1/button.gif" alt="" border=0 width="115" height="29"></div>

<div id="Oobj10" style="position:absolute;z-index:32;visibility:visible; left:560px;top:200px;width:115px;height:29px;font-size:1px;">
<img name="Ggeo68" Align=Top SRC="Template 1/button.gif" alt="" border=0 width="115" height="29"></div>

<div id="Oobj12" style="position:absolute;z-index:33;visibility:visible; left:680px;top:200px;width:115px;height:29px;font-size:1px;">
<img name="Ggeo69" Align=Top SRC="Template 1/button.gif" alt="" border=0 width="115" height="29"></div>

<div id="Oobj13" style="position:absolute;z-index:34;visibility:visible; left:800px;top:200px;width:115px;height:29px;font-size:1px;">
<img name="Ggeo70" Align=Top SRC="Template 1/button.gif" alt="" border=0 width="115" height="29"></div>

<div id="Oobj14" style="position:absolute;z-index:35;visibility:visible; left:390px;top:920px;width:70px;height:13px;font-size:1px;">
<img name="Ggeo71" Align=Top SRC="Template 1/ftile_back.gif" alt="" border=0 width="70" height="13"></div>

<div id="Oobj15" style="position:absolute;z-index:36;visibility:visible; left:790px;top:920px;width:70px;height:13px;font-size:1px;">
<img name="Ggeo72" Align=Top SRC="Template 1/ftile_back.gif" alt="" border=0 width="70" height="13"></div>

<div id="Oobj74" style="position:absolute;z-index:37;visibility:visible; left:0px;top:200px;width:30px;height:64px;font-size:1px;">
<img name="Ggeo74" Align=Top SRC="Template 1/left.png" alt="" border=0 width="30" height="64"></div>

<div id="Oobj16" style="position:absolute;z-index:38;visibility:visible; left:0px;top:260px;width:30px;height:64px;font-size:1px;">
<img name="Ggeo75" Align=Top SRC="Template 1/left.png" alt="" border=0 width="30" height="64"></div>

<div id="Oobj17" style="position:absolute;z-index:39;visibility:visible; left:0px;top:320px;width:30px;height:64px;font-size:1px;">
<img name="Ggeo76" Align=Top SRC="Template 1/left.png" alt="" border=0 width="30" height="64"></div>

<div id="Oobj79" style="position:absolute;z-index:40;visibility:visible; left:0px;top:170px;width:30px;height:32px;font-size:1px;">
<img name="Ggeo79" Align=Top SRC="Template 1/topleft.png" alt="" border=0 width="30" height="32"></div>

<div id="Oobj81" style="position:absolute;z-index:41;visibility:visible; left:0px;top:380px;width:30px;height:37px;font-size:1px;">
<img name="Ggeo81" Align=Top SRC="Template 1/bottomleft.png" alt="" border=0 width="30" height="37"></div>

<div id="Oobj83" style="position:absolute;z-index:42;visibility:visible; left:30px;top:170px;width:63px;height:32px;font-size:1px;">
<img name="Ggeo83" Align=Top SRC="Template 1/top.png" alt="" border=0 width="63" height="32"></div>

<div id="Oobj18" style="position:absolute;z-index:43;visibility:visible; left:90px;top:170px;width:63px;height:32px;font-size:1px;">
<img name="Ggeo84" Align=Top SRC="Template 1/top.png" alt="" border=0 width="63" height="32"></div>

<div id="Oobj19" style="position:absolute;z-index:44;visibility:visible; left:150px;top:170px;width:63px;height:32px;font-size:1px;">
<img name="Ggeo85" Align=Top SRC="Template 1/top.png" alt="" border=0 width="63" height="32"></div>

<div id="Oobj21" style="position:absolute;z-index:45;visibility:visible; left:170px;top:170px;width:63px;height:32px;font-size:1px;">
<img name="Ggeo86" Align=Top SRC="Template 1/top.png" alt="" border=0 width="63" height="32"></div>

<div id="Oobj88" style="position:absolute;z-index:46;visibility:visible; left:233px;top:176px;width:30px;height:32px;font-size:1px;">
<img name="Ggeo88" Align=Top SRC="Template 1/topright.png" alt="" border=0 width="30" height="32"></div>

<div id="Oobj90" style="position:absolute;z-index:47;visibility:visible; left:238px;top:208px;width:30px;height:64px;font-size:1px;">
<img name="Ggeo90" Align=Top SRC="Template 1/right.png" alt="" border=0 width="30" height="64"></div>

<div id="Oobj22" style="position:absolute;z-index:48;visibility:visible; left:237px;top:271px;width:30px;height:64px;font-size:1px;">
<img name="Ggeo91" Align=Top SRC="Template 1/right.png" alt="" border=0 width="30" height="64"></div>

<div id="Oobj23" style="position:absolute;z-index:49;visibility:visible; left:237px;top:334px;width:30px;height:64px;font-size:1px;">
<img name="Ggeo92" Align=Top SRC="Template 1/right.png" alt="" border=0 width="30" height="64"></div>

<div id="Oobj25" style="position:absolute;z-index:50;visibility:visible; left:238px;top:397px;width:30px;height:64px;font-size:1px;">
<img name="Ggeo93" Align=Top SRC="Template 1/right.png" alt="" border=0 width="30" height="64"></div>

<div id="Oobj26" style="position:absolute;z-index:51;visibility:visible; left:237px;top:460px;width:30px;height:64px;font-size:1px;">
<img name="Ggeo94" Align=Top SRC="Template 1/right.png" alt="" border=0 width="30" height="64"></div>

<div id="Oobj30" style="position:absolute;z-index:52;visibility:visible; left:237px;top:522px;width:30px;height:64px;font-size:1px;">
<img name="Ggeo95" Align=Top SRC="Template 1/right.png" alt="" border=0 width="30" height="64"></div>

<div id="Oobj32" style="position:absolute;z-index:53;visibility:visible; left:237px;top:586px;width:30px;height:64px;font-size:1px;">
<img name="Ggeo96" Align=Top SRC="Template 1/right.png" alt="" border=0 width="30" height="64"></div>

<div id="Oobj34" style="position:absolute;z-index:54;visibility:visible; left:238px;top:649px;width:30px;height:64px;font-size:1px;">
<img name="Ggeo97" Align=Top SRC="Template 1/right.png" alt="" border=0 width="30" height="64"></div>

<div id="Oobj35" style="position:absolute;z-index:55;visibility:visible; left:238px;top:713px;width:30px;height:64px;font-size:1px;">
<img name="Ggeo98" Align=Top SRC="Template 1/right.png" alt="" border=0 width="30" height="64"></div>

<div id="Oobj102" style="position:absolute;z-index:56;visibility:visible; left:238px;top:776px;width:30px;height:37px;font-size:1px;">
<img name="Ggeo102" Align=Top SRC="Template 1/bottomright.png" alt="" border=0 width="30" height="37"></div>

<div id="Oobj103" style="position:absolute;z-index:57;visibility:visible; left:350px;top:210px;width:400px;height:17px;">
<a href="http://www.wowaholics.net/"><font face="Tahoma" class="fsx01" color="#ffffff"><B>Home<br></B></font></a>
</div>

<div id="Oobj104" style="position:absolute;z-index:58;visibility:visible; left:470px;top:210px;width:400px;height:17px;">
<a href="http://www.wowaholics.net/news.php"><font face="Tahoma" class="fsx01" color="#ffffff"><B>News<br></B></font></a>
</div>

<div id="Oobj105" style="position:absolute;z-index:59;visibility:visible; left:590px;top:210px;width:400px;height:17px;">
<a href="http://www.wowaholics.net/archive.php"><font face="Tahoma" class="fsx01" color="#ffffff"><B>Archive<br></B></font></a>
</div>

<div id="Oobj106" style="position:absolute;z-index:60;visibility:visible; left:720px;top:210px;width:400px;height:17px;">
<a href="http://www.wowaholics.net/guides.php"><font face="Tahoma" class="fsx01" color="#ffffff"><B>Guides<br></B></font></a>
</div>

<div id="Oobj107" style="position:absolute;z-index:61;visibility:visible; left:840px;top:210px;width:400px;height:17px;">
<a href="http://wowaholics.net/forum/"><font face="Tahoma" class="fsx01" color="#ffffff"><B>Forum<br></B></font></a>
</div>

<div id="Oobj76" style="position:absolute;z-index:62;visibility:visible; left:290px;top:0px;width:700px;height:200px;font-size:1px;">
<img name="Ggeo25" Align=Top SRC="Template 1/logo copy.gif" alt="" border=0 width="700" height="200"></div>

<div id="Oobj69" style="position:absolute;z-index:63;visibility:visible; left:10px;top:30px;width:262px;height:108px;font-size:1px;">
<img name="Ggeo26" Align=Top SRC="Template 1/logo_phpBB.gif" alt="" border=0 width="262" height="108"></div>


</body> 

<head>	<!--used for VM preview mode only -->
<meta http-equiv="Expires" content="-1">
</head>	<!--used for VM preview mode only -->
</html> 

og jeg tviler på at du kan ha

<link rel="stylesheet" type="text/css" href="cutenews/skins/rss_style.css" />

inne i <style>-taggen. putt den 3 linjer lenger ned.

 

Ellers virker det ikke som du har helt kontroll på css heller - koden din er ikke direkte feil, men noe tundvidt. På alle <div id="OobjXXX"> har du skrevet inn <style>-atributtene. Ikke noe galt i det, men jeg vil anbefale å flytte det over i en css-fil. På den måten blir html-dokumentet mye mer oversiktlig! :thumbup:

 

Forresten; hvorfor en ny <head>-tag helt i bunnen av kildekoden? Den kan du nok fjerne...

Endret av qualbeen
Lenke til kommentar
Gjest medlem-77217

Hmm... Har lest endel av det der nå... Men klarer forsatt ikke å gjøre det... :( Er det mulig at en av dere kunne ha hjelpet meg via MSN eller noe?

Lenke til kommentar

Har du skrevet koden selv?

Koden er et virrvarr uten like, og ting står hulter-til-bulter på siden i forhold til hvor de er skrevet i koden. Slikt er veldig vanskelig å sette seg inn i og fikse.

 

Hvis du greier å skrive om siden med skikkelig strukturert HTML, og CSS i egen fil, blir alt mye lettere. Da greier du også å finne ut av problemene dine selv.

 

Du sier du har lest guidene jeg linket til. Har du kun lest, eller har du også prøvd ut de kodesnuttene du har fått servert underveis (f.eks laget en prøveside)? Det er du faktisk nødt til å gjøre for å se hvordan ting oppfører seg.

Lenke til kommentar

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
×
×
  • Opprett ny...