Plik CSS
  1. #newsglowny {
  2. padding: 5px 20px 5px 20px;
  3. position:relative;
  4. width:500px;
  5. height:300px;
  6. background:#ff0000;
  7. }
  8. #newsglowny em b {
  9. position:absolute;
  10. font-size:150px;
  11. font-family:arial;
  12. color:#ff0000;
  13. line-height:40px;
  14. font-weight:normal;
  15. }
  16. #newsglowny p {
  17. position:relative;
  18. z-index:100;
  19. padding:5px 10px;
  20. }
  21. #ctl, #cbl, #ctr, #cbr {
  22. position:absolute;
  23. width:20px;
  24. height:20px;
  25. color:#9caf9c;
  26. background:#fff;
  27. overflow:hidden;
  28. font-style:normal;
  29. z-index:1;
  30. }
  31. #ctl {
  32. top:0;
  33. left:0;
  34. }
  35. #cbl {
  36. bottom:0;
  37. left:0;
  38. }
  39. #ctr {
  40. top:0;
  41. right:0;
  42. }
  43. #cbr {
  44. bottom:0;
  45. right:0;
  46. }
  47. #ctl b {
  48. left:-8px;
  49. }
  50. #ctr b {
  51. left:-25px;
  52. }
  53. #cbl b {
  54. left:-8px;
  55. top:-17px;
  56. }
  57. #cbr b {
  58. left:-25px;
  59. top:-17px;
  60. }

Dwa pliki
rogi.html:
  1. <title>Rogi</title>
  2. <link rel="stylesheet" type="text/css" href="rogi.css" />
  3. </head>
  4. <h2>Curved Corners</h2>
  5. <div id="newsglowny">
  6. <em id="ctl"><b></b></em>
  7. <em id="cbl"><b></b></em>
  8. <em id="ctr"><b></b></em>
  9. <em id="cbr"><b></b></em>
  10. <img src="news.jpg" /></div>
  11. </body>
  12. </html>

index.php [Kod po wygenerowaniu: fragment]
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
  4. <title>Strona główna</title>
  5. <link rel="stylesheet" type="text/css" href="style.css" />
  6. <link rel="stylesheet" type="text/css" href="rogi.css" />
  7. <link rel="stylesheet" type="text/css" href="menubar.css" title=""/>
  8. <script type="text/javascript" language="JavaScript" src="menubar.js"></script>
  9. </head>
  10. <div id="naglowek">Ble</div>
  11. <div id="menu">
  12. Tu jest menu
  13. </div>
  14. <div id="tresc">
  15. <div id="newsglowny">
  16. <em id="ctl"><b></b></em>
  17. <em id="cbl"><b></b></em>
  18. <em id="ctr"><b></b></em>
  19. <em id="cbr"><b></b></em>
  20. <img src="news.jpg" />
  21. </div>
  22. <br /><div id='pozostalenewsy'>
  23. <h4>Pozostałe newsy</h4>Dzisiaj jest 2008-01-21<br /></div>
  24. </div>
  25. <div id="stopka">
  26. Panel administracyjny serwisu heniek.ovh.org<br />
  27. Wszystkie dane zastrzeżone, kopiowanie bez zgody autora (tj. właściciela) surowo zabronione.<br />
  28. Copyright &copy by Heniek --> 2008 - 2008-01-21
  29. </div>
  30. </body>
  31. </html>

W pierwszym pliki rogi działają bez zarzutu, zaś w drugim coś jest nie tak.

Kod pliku style.css
  1. body {
  2. background: #fff center top repeat-y;
  3. margin: 0px;
  4. font-family: Tahoma, Verdana, Trebuchet Ms;
  5. font-size: 12px;
  6. color: #000;
  7. }
  8.  
  9. #naglowek {
  10. background: #dddddd;
  11. height: 180px;
  12. }
  13.  
  14.  
  15. #tresc {
  16. background: #fff;
  17. padding: 20px 10px 20px 10px;
  18. }
  19.  
  20. #stopka {
  21. background: #ff0000;
  22. text-decoration: none;
  23. text-align: center;
  24. padding: 20px 10px 20px 10px;
  25. }
  26.  
  27. #menu {
  28. height: 25px;
  29. }
  30.  
  31. #pozostalenewsy {
  32. padding: 5px 5px 5px 5px;
  33. width: 500px;
  34. background: #ff0000;
  35. }
  36.  
  37. h4 {
  38. text-decoration: underline;
  39. text-align: center;
  40. font-size: 18px;
  41. }