www.webdeveloper.com
Results 1 to 12 of 12

Thread: using css with includes

  1. #1
    Join Date
    Nov 2003
    Location
    albany
    Posts
    104

    using css with includes

    Ok I finnally got the include to work in php now the css does not work. Will someone explain why. Since there is more then one file I uploded them.
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    The css is applied. What is not working as expected?

  3. #3
    Join Date
    Nov 2003
    Location
    albany
    Posts
    104
    Quote Originally Posted by Fang View Post
    The css is applied. What is not working as expected?
    http://www.albanysite.com/workfolder/template.html

    Here is the way it should look.

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Miss-matched (div) tags.
    Correct version:
    Code:
    <div id="header">
    
    <div style="text-align: center"><h1>Albanysite.com</h1>
    
    </div>
    <div id="dolphincontainer">
      <div id="dolphinnav">
        <ul>
          <li><a href="localhost/" class="current"><span>home</span></a></li>
          <li><a href="/chat/"><span>chat</span></a></li>
          <li><a href="/upload"><span>uploads</span></a></li>
    
          <li><a href="/phpBB3"><span>forum</span></a></li>
          <li><a href="/gallery"><span>gallery</span></a></li>
          <li><a href="/download"><span>download folder</span></a></li>
          <li><a href="/comments"><span>mailto</span></a></li> 
          <li><a href="/shop"><span>store</span></a></li> 
          </ul>
      </div>
    
    </div>
    <body>
    php version:
    Code:
    <div id="header">
    <div style="text-align: center"><h1>Albanysite.com</h1>
    <div id="dolphincontainer">
      <div id="dolphinnav"> </div>
    </div>
    </div>
    
    
        <ul>
          <li><a href="localhost/" class="current"><span>home</span></a></li>
          <li><a href="/chat/"><span>chat</span></a></li>
          <li><a href="/upload"><span>uploads</span></a></li>
          <li><a href="/phpBB3"><span>forum</span></a></li>
          <li><a href="/gallery"><span>gallery</span></a></li>
    
          <li><a href="/download"><span>download folder</span></a></li>
          <li><a href="/comments"><span>mailto</span></a></li> 
          <li><a href="/shop"><span>store</span></a></li> 
          </ul>
     
    
     </div>
    </div>
    </div>

  5. #5
    Join Date
    Nov 2003
    Location
    albany
    Posts
    104

    resolved

    All css mastakes have to be simple by nature bacause css is simple but I do not care how hard I looked could not see it.
    www.albanysite.com/workfolder/
    Take a look at your fix..
    Last edited by dvdljns; 05-20-2010 at 04:31 AM. Reason: forgot to show solution

  6. #6
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Use a DTD:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    Duplicate elements:
    Code:
    <head>
    <title>albanysite</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" href="nav.css" type="text/css" MEDIA=screen />
    </head>
    <div id="header">
    
    <div style="text-align: center"><h1>Albanysite.com</h1>
    
    </div>
    <div id="dolphincontainer">
      <div id="dolphinnav">
    <div id="dolphincontainer">
      <div id="dolphinnav">
    
        <ul>
          <li><a href="localhost/" class="current"><span>home</span></a></li>
          <li><a href="/chat/"><span>chat</span></a></li>
          <li><a href="/upload"><span>uploads</span></a></li>
    
          <li><a href="/phpBB3"><span>forum</span></a></li>
          <li><a href="/gallery"><span>gallery</span></a></li>
    
          <li><a href="/download"><span>download folder</span></a></li>
          <li><a href="/comments"><span>mailto</span></a></li> 
          <li><a href="/shop"><span>store</span></a></li> 
          </ul>
      </div>
    
    </div>
    
    
    
       
     </div>
    
    </div>
    <body>
    Always check the generated code in your browser.

  7. #7
    Join Date
    Nov 2003
    Location
    albany
    Posts
    104

    Question

    Thats the bad thing about using a text editor like gedit instead of a ide but I am as new at linux as I am at php and the editor offered by debian was worse.
    Now I have to learn how to add this to php programs I downloaded thought it would be easy like with asp but all I have got so far is an error that the header has all ready been sent and giberish where the programs code is.

  8. #8
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <title>albanysite</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="stylesheet" href="nav.css" type="text/css" media="screen">
    </head>
    <body>
    <div id="header">
        <div style="text-align: center"><h1>Albanysite.com</h1></div>
        <div id="dolphincontainer">
            <div id="dolphinnav">
            <?php include'menu.html';?>
            </div>
        </div>
    </div>
    </body>
    </html>

  9. #9
    Join Date
    Nov 2003
    Location
    albany
    Posts
    104
    I know the answer is in there but I am going to find the right way to aply it.
    Code:
    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /var/www/chat/index.php:11) in /var/www/chat/index.php on line 36
    
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/chat/index.php:11) in /var/www/chat/index.php on line 36
    ‹������&#213;&#253;o&#219;&#182;&#242;&#231;&#216;&#255;&#192;i&#216;&#220;b&#179;e'&#233;—#{X“&#180;&#235;C–‰&#243;&#250;&#182;&#162;h‰‘&#217;P&#164;F&#210;q\&#236;w$&#173;&#200;Žœ:E&#243;€ 1y&#186;&#239;;&#221;‡“|&#183;&#255;&#199;&#222;&#232;&#207;&#227;2&#177;… &#199;g&#175;&#223;&#238;‘&#168;&#199;&#239;&#182;&#247;&#226;x&#180;O&#254;&#243;&#219;&#232;&#247;C&#210;&#235;&#244;&#226;&#248;&#224;("&#209;&#196;&#218;&#178;&#199;&#179;&#217;&#172;3&#219;&#238;(&#199;&#163;“&#248;&#201;{=$Xœ;™&#205;&#162;&#225;&#183;&#199;&#249;&#186;&#210;ˆ{/_&#190;&#244;$™&#209;> &#252;$–[&#193;†&#217;U&>JC&#254;!{z4Jb8&#179;” &#215;6&#251;{&#202;&#175;&#209;ž’–I&#219;&#205;K‘&#212;&#223;‘e&#215;6F)&#187;$Pm˜œ^&#183;_D$&#254;,&#171;S;&#172;‘aj&#204;*I6ˆr&™&#166;V&#233;…S&#217;&#237;&#244;jD‚&#203;K&#162;™D0#2&#209;&#236;&#162;&#242;“P)e@&#210;„&#218;&#248;‚^!R&#254;D&#196;‚>@T&#208;œ&#197;&#215;mO&#220;&#192;&#213;L”&#182;&#233;&#212;’b&#190;1&#198;&#236;&#221;&#188;&#205;&#37;—&~%&#166;&#236;&#212;2&bG&#215;q&#254;&#243;’&#252;y)@—<-U9-&#215;1G&#214;&#223;>&#250;&#230;&#185;#&#167;&#182;T&#186; &#162;Y€&#203;&#206;At&#228;P&#200;&#224;&#222;&#162;&#186;@*,&#211;’ZF&#238;-&#218;�&#215;&#187;%Ÿ"&#198;&#215;,&#168;&#206;&#217;‚&#163;&#236;&#188;L&#169;>“j^Z"&#168;&#204;&#167;Uƒ&#232;_&#244;Šž:&#224;&#207;�6lt&#186;N&#179;&N•f&&&#177;'>z�)E&#246;&#244;&#225;…Œ&#169;a&#207;v^N&#198;&#204;&#255;@ˆ&#166;&#249;&#195;K&#249;&#164;Taf&#220;&#166;“Y.&#219;&#226;&#208;I’&#177;&#202;&#230;D&#176;[@~r9ˆ&#186; O•&#181;›?&#206;xf'&#181;&#251;„&#241;|b $`–&#241;+&#194;&#179;ATP.&#207;g\&#186;ž…@*x&#220;R&#168;&#244;Lƒ2cJM &#228;&#178;„&#236;&#237;œ&#240;,cPN}&#171;0&#240;RFŽ&#169;?]Q(’ƒ&#232;Ywg&#231;&#245;&#243;&#237;&#237;›’uŒZš1A&#231;žQ&#237;&#184;=&#237;v&#187;qš&#166;kœj&#215;&#192;i&#187;&#187;)+H&#181;&#243;T&#207;&#203;`]&#237;X1I&#199;‚m&#196;c>&#213;&#194;s&#170;.Os†p™&#177;&#235;N9)k0R&#174;&#242; "&#238;>&#217;&#233;v&#203;&#235;]&#198;1I50&#164;&#204;!=0„&#213;}&#220;&#195;&#244;/&#182;nƒ&#182;oƒv~ƒ&#248;&#234;‘&#186;“AT&#203;“o‹>!cn&#215;.&#249;&#208;b„&#169;!&#228;&#232;&#246;s€FB&#229;> &#224; &#177;&#234;&#227;![IK˜E„))�&#182;&#162;…Jše\&#230;}&#210;&#221; R&#251;x&#162;&#233;e&#174;&#213;Tf}&#174;~&#220;&#218;&#172;&#171;&#187;q&#193;�V&#174;:&#165;&#204;[O &#237;”Œ&#218;&#246;5&#249;~&#239;&#229;&#254;&#193;&#235;_w&#189;&#223;&#193;p&#187;&#197;&#250;=Œ8&#170;&#230;ž&#195; &#186;&#220;œ@&#168;&#180;‚_A#RE\&#217;&#224;T&#198; P&#203;•&#236;&#169;$&#171;&#204;&#203;&#192;n‡&#239;Ÿ=q&#176;a 3eS ˆ…&#191;6s^ƒƒ&#222;&#246;c&#205;q&#195;O&#209;BQ&#219;w&#245;%&#169;Q&#218;-&#161;P�&#175;[&#163;&#217;&#192;ˆ&#249;]5.x“j&#173;f&#231;(&#161;“&#243;‹&#168;žm:&#213;&#237;+&#199;8/,o•&#181;&#170;�]&#192;&#189; X*xz&#230;Pp &#180;4&#236;q&#203;k|Ž&#175;&#186;i&#253;L&#236;„›ŸI&#203;K&#205;&#212;L&#182;&#170;&#234;&#208;z‚&#239;&#211;&#194;&#184;F&#183;&#185;”&#173;s&#173;&#205;&#184;)&#161;˜&#248;�E&#238;]Š&#169;K_&#239;&#221;&#221;&#168;m&#188;&#244;&#201;S—1S1„&#233;f&#246;k&#200;p1&#190;&#196;IaHbxš&#196;ˆ&#182;&#164;&#233;b2&#169;^&#187;/Š6›™>&#217;&#218;jww&#218;[&#221;&#238;&#243;&#255;›€KP&#252;&#235;&#185;}6&#192;Ÿ&#175;C&#171;&#241;&#198;<|&#199;&#188;&#232;0T*ro=n€&#246;;_LIh&#177;p‚&#167;†1‚c/\&#184; t•™q&#237;„$|(“˜&#223;&#182;e}"„z&#251;&#180;&#251;ƒS&#231;&#204;&#224;&#244;\&#176;&#190;&#175;&#233;6[I&#164;[$&#245;†f&#221;`&#236;<†&#181;-46U&#207;&#161;Ÿ{&#196;&#208;&#219;&#162;•~&#245;&#248;&#186;&#176;€&#240;J&#229;8&#232;&#188;&#164;&#251;&#170;&#242;&#199; bir—&#242;&#235;&#181;/&#181;&#183;�o&#252;&#185;&#193;‚&#175;&#165;8]J&&#204;&#230;Š&Xj&#179;B}ˆMjakV%vŽ…&#215;&#199;&#250;Ÿš&#218;N6v&#196;&#240;&#254;˜&#218;$&#246;ˆ&#195;˜iu&#246; r&#190;&#162;xƒ&#191;&#214; f‰5&#193;X&#170;+’#„œ&#164;"Y23&#246;f5&#186;&#176;1{Wyf&#239;/rd1&#199;&#209;}&#225;&#202;&#197;&#173;!&#198;Pv&#192;&#207;8&#225;&#195;&#213;&#193; ‡&#166;t\o&#253;&#213;)&#173;Ÿ&#188;‰&#230;=–&#161;Ž&#196;&#178;&#183;8&#180;}&#232;8&#237;’&#219;&#221;&#221;†pQ]0&#201;!&#184;&#195;_&#195;i&#211;™&#204;7P<[&#239;›I7[&#251;=F&#201;&#229;J1žB&#170;&#222;97žž›&#233;&#184;&#224;&#161;&#250;-C–&#234;&#198;‚tuD&#255;&#225;V3&#243;&#228;‡&#200;&#234;&#241;“&#170;X&#186;{Dhš2c.&#217;„&#221;|;&#207;&#200;&#227;&#234;O&#170;zT7&#191;&#234;m&#205;Y&#192;&#180;&#206;”6sM}c&#168;f&#217;.&#185;€&#225;&#191;m&#248;'{[&#216;&#174;&#231;&#194;&#228;‰''&#191;Ÿ&#190;i&#238;&#189;n‘‘*,&#187;!\›‡jS}†&#239;&#168;–n18ŒF&#252;&#182;Fn&#246;&#243;u&#163;A&#223;hG&#238;ŸK‹‘&#191;&#218;&#223;~&#161;)&#166;&#240;@&#179;&#252;&#238;‰&#191;Š&#245; &#203;&#185;q{&#248;{r ’&#200;YI>&#224;&#176;&#255;&#163;›r&#247;.&#198;*&#205;6&#227;&#176;&#193;u:‡&#193;‹IRuI&#188;x&#250;&#193;o&#183;b&#184;X&#248;b&#183;&#220;aQs›&#200;&#210;"&#234;&#231;&#185;&#229;]t&#231;&#188;i&#245;ln5{~—&#167;&#224;J&#250;"&#166;&#202;&#185;›^ &#174;&#169;&#240;&#172;\&#253;&#170;c&#185;‡�&#202;{&#242;&#230;/^’—/&#249;&#240;ž&#236;œ’c&#173;&#172;&#171;&#179;&#224;&#197;&#228;–`&#210;‘š‚3&#255;&#205;tF%&#215;C"&#216;&#184;&#213;ŒAj’&#241;œ&#172;&#238;&#248;&#255;ƒ&#213;]&#208;&#226;&#215;vC&#243;–—U&#252;&#183;&#238;&#191;&#225;y&#189;/&#194;q&#194;&#203;u&#217;&#189;~ &#208;&#163;$F&#224;p&#228;&#163;&#229;&#206;&#232;‘&#178;&#247;Ij&#209;&#171;C&#192;Ÿ*›;4&#252;?&#254;M„&#233;&#244;]��

  10. #10
    Join Date
    Nov 2003
    Location
    albany
    Posts
    104
    I know this is asking a lot but can you download these zips and give me a real world example.
    www.albanysite.com/download/
    also /uploads
    Last edited by dvdljns; 05-20-2010 at 08:46 AM. Reason: typo

  11. #11
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Those are problems with php in the chat documents. Ask in the php forum.

  12. #12
    Join Date
    Nov 2003
    Location
    albany
    Posts
    104
    ok,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles