<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[HTML אחד ו CSS שונים]]></title><description><![CDATA[<p dir="rtl">שלום וברכה...</p>
<p dir="rtl">יש לי קובץ HTML עם סקריפט, יש לי צורך להטמיע את הקוד בכמה עמודים באתר בעיצובים שונים (שינוי רק מבחינת ה CSS) , יהיה קשה לעדכן כל קובץ בנפרד.</p>
<p dir="rtl">יש דרך לעשות שכל העמודים יקבלו אותו HTML וסקריפט, אבל יקבלו CSS שונים?</p>
<p dir="rtl">תודה רבה...</p>
]]></description><link>https://tchumim.com/topic/11761/html-אחד-ו-css-שונים</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 14:23:31 GMT</lastBuildDate><atom:link href="https://tchumim.com/topic/11761.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 15 Aug 2021 12:22:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to HTML אחד ו CSS שונים on Fri, 20 Aug 2021 09:29:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dovid" aria-label="Profile: dovid">@<bdi>dovid</bdi></a><br />
יש למישהו תשובה?</p>
]]></description><link>https://tchumim.com/post/127661</link><guid isPermaLink="true">https://tchumim.com/post/127661</guid><dc:creator><![CDATA[ASS]]></dc:creator><pubDate>Fri, 20 Aug 2021 09:29:48 GMT</pubDate></item><item><title><![CDATA[Reply to HTML אחד ו CSS שונים on Wed, 18 Aug 2021 18:50:52 GMT]]></title><description><![CDATA[<p dir="rtl"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%9E%D7%95%D7%A8%D7%A9%D7%AA-%D7%9E%D7%A8%D7%9F" aria-label="Profile: מורשת-מרן">@<bdi>מורשת-מרן</bdi></a> אתה הולך סחור סחור, ובלבד שלא לספר את הסיפור המלא.<br />
אני מבין אותך, זה מקום ציבורי פה ואולי אתה לא יכול להגיד הכל, אבל רחמנות גם על אלה שעונים כסומא בארובה.</p>
]]></description><link>https://tchumim.com/post/127561</link><guid isPermaLink="true">https://tchumim.com/post/127561</guid><dc:creator><![CDATA[dovid]]></dc:creator><pubDate>Wed, 18 Aug 2021 18:50:52 GMT</pubDate></item><item><title><![CDATA[Reply to HTML אחד ו CSS שונים on Wed, 18 Aug 2021 12:26:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dovid" aria-label="Profile: dovid">@<bdi>dovid</bdi></a><br />
תודה.<br />
ניסיתי את זה.<br />
אבל יש לי  בעיה בגלל שאני צריך שאותו קובץ יזין כמה עמודים שונים, מה שאומר שהקובץ HTML צריך להיות מאוחסן בשרת וככה גם הסטייל.<br />
צריך רק איזה קוד שימשוך את הHTML והסטייל מהשרת ,נכון?</p>
]]></description><link>https://tchumim.com/post/127541</link><guid isPermaLink="true">https://tchumim.com/post/127541</guid><dc:creator><![CDATA[מורשת מרן]]></dc:creator><pubDate>Wed, 18 Aug 2021 12:26:17 GMT</pubDate></item><item><title><![CDATA[Reply to HTML אחד ו CSS שונים on Tue, 17 Aug 2021 11:38:16 GMT]]></title><description><![CDATA[<p dir="rtl"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%9E%D7%95%D7%A8%D7%A9%D7%AA-%D7%9E%D7%A8%D7%9F" aria-label="Profile: מורשת-מרן">@<bdi>מורשת-מרן</bdi></a> תשנה את שמות הCSS ל:<br />
main.html.css<br />
Second.html.css</p>
<p dir="rtl">ובדף הhtml מחק את תגית הlink שמקשרת לCSS לחלוטין, ושים את הסקריפט הזה בhead של הhtml</p>
<pre><code>&lt;script&gt;
function addCss(url) {
    var link = document.createElement("link");
    link.type = "text/css";
    link.rel = "stylesheet";
    link.href = url;
 
    document.head.appendChild(link);
}
 
addCss(location.pathname + '.css');
&lt;/script&gt;
</code></pre>
]]></description><link>https://tchumim.com/post/127478</link><guid isPermaLink="true">https://tchumim.com/post/127478</guid><dc:creator><![CDATA[dovid]]></dc:creator><pubDate>Tue, 17 Aug 2021 11:38:16 GMT</pubDate></item><item><title><![CDATA[Reply to HTML אחד ו CSS שונים on Tue, 17 Aug 2021 08:07:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dovid" aria-label="Profile: dovid">@<bdi>dovid</bdi></a><br />
דף אחד:main.html/<br />
דף שני: Second.html/</p>
<p dir="rtl">דף סגנון 1: style1.sss/<br />
דף סגנון 1: style2.sss/</p>
]]></description><link>https://tchumim.com/post/127457</link><guid isPermaLink="true">https://tchumim.com/post/127457</guid><dc:creator><![CDATA[מורשת מרן]]></dc:creator><pubDate>Tue, 17 Aug 2021 08:07:01 GMT</pubDate></item><item><title><![CDATA[Reply to HTML אחד ו CSS שונים on Tue, 17 Aug 2021 07:53:21 GMT]]></title><description><![CDATA[<p dir="rtl"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%9E%D7%95%D7%A8%D7%A9%D7%AA-%D7%9E%D7%A8%D7%9F" aria-label="Profile: מורשת-מרן">@<bdi>מורשת-מרן</bdi></a> מה הכתובת של הדפים השונים, תן דוגמא לשני כתובות שאתה רוצה שיביאו את אותו הדף בסגנונות שונים<br />
כתובת אני מתכוון החל מה/ שאחרי הדומיין, למשל:</p>
<pre><code>/folder/page.html
</code></pre>
<p dir="rtl">כמו"כ מה כתובת קובץ הסגנון היחיד שבינתיים ישנו</p>
]]></description><link>https://tchumim.com/post/127455</link><guid isPermaLink="true">https://tchumim.com/post/127455</guid><dc:creator><![CDATA[dovid]]></dc:creator><pubDate>Tue, 17 Aug 2021 07:53:21 GMT</pubDate></item><item><title><![CDATA[Reply to HTML אחד ו CSS שונים on Tue, 17 Aug 2021 07:47:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dovid" aria-label="Profile: dovid">@<bdi>dovid</bdi></a><br />
תודה על התשובה...<br />
לא כל כך הבנתי איפה לשים את הסקריפט ואיזה קישורים לשים בדיוק , אני לא  מתמצא כמו שצריך :).</p>
<p dir="rtl">כרגע יש לי קובץ אחד עם HTML, סטייל, וסקריפט.</p>
<p dir="rtl">מה אני צריך לעשות?</p>
]]></description><link>https://tchumim.com/post/127453</link><guid isPermaLink="true">https://tchumim.com/post/127453</guid><dc:creator><![CDATA[מורשת מרן]]></dc:creator><pubDate>Tue, 17 Aug 2021 07:47:14 GMT</pubDate></item><item><title><![CDATA[Reply to HTML אחד ו CSS שונים on Mon, 16 Aug 2021 06:05:39 GMT]]></title><description><![CDATA[<p dir="rtl"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%9E%D7%95%D7%A8%D7%A9%D7%AA-%D7%9E%D7%A8%D7%9F" aria-label="Profile: מורשת-מרן">@<bdi>מורשת-מרן</bdi></a> אתה יכול בJS לשנות כמה דברים:</p>
<ol>
<li>להוסיף קובץ סגנון:</li>
</ol>
<pre><code>function addCss(url) {
    var link = document.createElement("link");
    link.type = "text/css";
    link.rel = "stylesheet";
    link.href = url;

    document.head.appendChild(link);
}

addCss(location.pathname.replace('/', '_') + '.css');
</code></pre>
<ol start="2">
<li>
<p dir="rtl">להוסיף class בbody ואז בקובץ הסגנון לתלות הכל לפי הקלאס הזה:</p>
<pre><code>   document.body.classList.add(location.pathname.replace('/', '_'));
</code></pre>
</li>
</ol>
<p dir="rtl">אולי תשתמש עם דינמיות צד שרת וזה יחסוך לך את כל הבעיה.</p>
]]></description><link>https://tchumim.com/post/127368</link><guid isPermaLink="true">https://tchumim.com/post/127368</guid><dc:creator><![CDATA[dovid]]></dc:creator><pubDate>Mon, 16 Aug 2021 06:05:39 GMT</pubDate></item><item><title><![CDATA[Reply to HTML אחד ו CSS שונים on Sun, 15 Aug 2021 14:43:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dovid" aria-label="Profile: dovid">@<bdi>dovid</bdi></a><br />
לגבי הפתרון הראשון, איך אני יכול לעדכן HTML אחד והכל מתעדכן? הרי כל אחד בתקייה אחרת.<br />
ולגבי הפתרון השני אני ישמח לדעת איזה סקריפט אני צריך בשביל זה..</p>
<p dir="rtl">תזכה למצוות</p>
]]></description><link>https://tchumim.com/post/127328</link><guid isPermaLink="true">https://tchumim.com/post/127328</guid><dc:creator><![CDATA[מורשת מרן]]></dc:creator><pubDate>Sun, 15 Aug 2021 14:43:24 GMT</pubDate></item><item><title><![CDATA[Reply to HTML אחד ו CSS שונים on Sun, 15 Aug 2021 12:41:19 GMT]]></title><description><![CDATA[<p dir="rtl"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%9E%D7%95%D7%A8%D7%A9%D7%AA-%D7%9E%D7%A8%D7%9F" aria-label="Profile: מורשת-מרן">@<bdi>מורשת-מרן</bdi></a> הבעיה שלך מסקרנת, למה זה חייב להיות HTML זהה?<br />
אבל אם נניח את סקרנותי בצד אתה יכול</p>
<ol>
<li>לשים אותם בתיקיות שונות ואז שהCSS עם אותו שם באותה תיקיה עם הפניה יחסית,</li>
<li>לטעון את הסטייל עם סקריפט בהתאם לשם הדף/נתיב נוכחי (זה יעבוד פחות טוב).</li>
</ol>
]]></description><link>https://tchumim.com/post/127319</link><guid isPermaLink="true">https://tchumim.com/post/127319</guid><dc:creator><![CDATA[dovid]]></dc:creator><pubDate>Sun, 15 Aug 2021 12:41:19 GMT</pubDate></item><item><title><![CDATA[Reply to HTML אחד ו CSS שונים on Sun, 15 Aug 2021 12:35:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ivrtikshoret" aria-label="Profile: ivrtikshoret">@<bdi>ivrtikshoret</bdi></a><br />
יש לי בעיה איך לגרום לשנות את ה HTML והוא ישתנה בכל העמודים למרות שכל אחד מהם הוא CSS אחר.</p>
]]></description><link>https://tchumim.com/post/127318</link><guid isPermaLink="true">https://tchumim.com/post/127318</guid><dc:creator><![CDATA[מורשת מרן]]></dc:creator><pubDate>Sun, 15 Aug 2021 12:35:20 GMT</pubDate></item><item><title><![CDATA[Reply to HTML אחד ו CSS שונים on Sun, 15 Aug 2021 12:30:00 GMT]]></title><description><![CDATA[<p dir="rtl"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%9E%D7%95%D7%A8%D7%A9%D7%AA-%D7%9E%D7%A8%D7%9F" aria-label="Profile: מורשת-מרן">@<bdi>מורשת-מרן</bdi></a><br />
תגדיר בכל דף מאיפה הוא יקבל את ה css ככה:</p>
<pre><code>    &lt;link rel="stylesheet" href="/css/mystyle.css"&gt;
</code></pre>
]]></description><link>https://tchumim.com/post/127316</link><guid isPermaLink="true">https://tchumim.com/post/127316</guid><dc:creator><![CDATA[ivrtikshoret]]></dc:creator><pubDate>Sun, 15 Aug 2021 12:30:00 GMT</pubDate></item></channel></rss>