SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Evangelist stef25's Avatar
    Join Date
    Nov 2004
    Location
    belgium
    Posts
    465
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    framesets - where do i put css files?

    i have to build a site using framesets. my index.html is below. the top frame always stays the same but the bottom one changes. at the moment i have my css file in the index.html but styles arent being applied in either of my frames.

    where do i put the link to the css file? there are no <head> tags in the files which appear in the frames. do i have to use inline css?

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
    <html>
    <head>
    	<title>My Page</title>
    	<link rel="stylesheet" type="text/css" href="_css/reset-fonts-grids.css"> 
    	<link rel="stylesheet" type="text/css" href="_css/styles.css"> 
    </head>
    			
    <frameset rows="110px,*">
    
      <frame src="top.html" />
      <frame src="home.html" />
    
    </frameset>
    
    </html>
    I need someone to protect me from
    all the measures they take in order to protect me

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Each frame contains a complete, separate HTML document which needs to link to a CSS file. You can use a single CSS file and link to it from each frame page, or they can be entirely separate.

    A frameset is not one page, but an agglomerate of separate pages.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Evangelist stef25's Avatar
    Join Date
    Nov 2004
    Location
    belgium
    Posts
    465
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so does each page loaded in a frame also need a doctype, head and body tags?
    I need someone to protect me from
    all the measures they take in order to protect me

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,869
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Yes - each frame contains a completely separate HTML page.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    SitePoint Member
    Join Date
    Feb 2009
    Location
    Atlanta, GA
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am trying to post a query here along with the code..
    I am not able to do this..
    why.. can any one please let me know ?

    Do I need to post at least 10 messages prior to post codes?

  6. #6
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    If you don't have an explicit head section, you need to place the stylesheet reference between the DOCTYPE and body element (or the first element in the body, if you don't have an explicit body):

    Code html4strict:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
     
    <title>Sample frame page</title>
     
    <link rel="stylesheet" href="..." type="text/css">
     
    <h1>Sample frame page</h1>
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  7. #7
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by donsarkar View Post
    Do I need to post at least 10 messages prior to post codes?
    I don't think so, but you need 10 posts before you can post a URI. In the meantime you can circumvent it by adding space characters around the periods in the domain name, e.g., www . example . com.
    Birnam wood is come to Dunsinane

  8. #8
    SitePoint Member
    Join Date
    Feb 2009
    Location
    Atlanta, GA
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    I don't think so, but you need 10 posts before you can post a URI. In the meantime you can circumvent it by adding space characters around the periods in the domain name, e.g., .....
    This not the case.. Even..


    I tried to post with code, it gave below error
    "The number of tags you tried to add to this thread exceeded the maximum number of tags by 1."

    Then I tried to post with out any code..
    Still getting the same error..
    I am gonna mad..

  9. #9
    SitePoint Member
    Join Date
    Feb 2009
    Location
    Atlanta, GA
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    unless an until I post some thing how my post count will increase ??

    and until my post count increases.. this system is not allowing me to post..

    This is so bad..




    I guess, I have to increase my post count by writing these kind of stupid posts first..

  10. #10
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,869
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by donsarkar View Post
    I guess, I have to increase my post count by writing these kind of stupid posts first..
    The whole purpose of the limits is that if you post too much garbage in the first few posts then one of the moderators can delete all the fluff posts and spam before those responsible get a high enough number of posts to get the benefit that the spammers are looking to get by spamming in the first place.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  11. #11
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by donsarkar View Post
    I tried to post with code, it gave below error
    "The number of tags you tried to add to this thread exceeded the maximum number of tags by 1."
    Ah. This is problably the tags 'feature' of the forum, where you can specify 'tags' (keywords) for a thread. There are no tags specified for this thread, though.

    Since this thread is quite old, why don't you just create a new thread for your question? Don't put anything into the 'tags' field of the new thread, and you should be fine. (You won't be able to post live links until you reach 10 posts, though. This is an unfortunate effect of SitePoint's efforts to reduce spam.)
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

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