Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: CSS for each page?

  1. #1
    Join Date
    Jul 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS for each page?

    I don't know all the technical terms for what I want to ask . Sorry.

    I am using the script on this page http://www.dynamicdrive.com/dynamicindex1/popit.htm
    It took me 3 long days to finally figure out how to make it work. I really do not know all the codeing stuff. Anyhow. What I want to know is there a way to not have to upload this to each page in my site once I have done it originally? I have over 140 pages and am always adding new things and new pages as needed. Is there a way to make this so that when I do add a new page that I do not have to upload the adjusted mouse over script to each page seperately?
    Like uploading the spript and being able to just have a link to that on each page so I only have to change on one page of thingy. I will not have to add to the basic menu, just the mouse over windows.
    Also. I made buttons for the base link because I could not figure out how to make a text link be centered and to make it the look I wanted on the page. This is what I did. I'm not sure if I like it. It seems to load slow.http://www.colonialzone-dr.com/temp.html

    So any help would be appriciated. I'm really getting tired of working on this thing.
    Last edited by RD_Gringa; 11-17-2006 at 10:01 AM. Reason: lost what I was writing..jejee

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Place your CSS items into another file and save that with an extension .CSS and in each of your page within your <HEAD></HEAD> section give the following

    Code:
    <link rel="stylesheet" href="yourcssfile.css" type="text/css">
    *specify the path of the CSS file if it is not with your HTML pages
    Or

    If you are using any kind of HTML template then give the above line in your template once not necessary to copy the above line in your all the pages.

  3. #3
    Join Date
    Jul 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default O think I have it...

    Ok...let me see if this is correct. The Code I have in my <head></head>now (the code that it said to place there in the instructions) I take that out and take the code that I have in the body out also. I upload the entire thing to my server and call it yourcssfile.css (or whatever I call it). Then I place the code you gave me in the header a page. Then the menu will automaticly appear on every page I place that one line of code in the head of the page. Then when I have to add something I just add it to the css file and it will automaticly update every page that that little code you gave me is on?
    I just want to make sure I have it correct.

  4. #4
    Join Date
    Jul 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default thought

    I make the thing on html kit. When I made it the tags head and document type are on the page. Should I remove these from the page before I upload it?

  5. #5
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    A typical CSS page doesn't contain any HTML tags in the way we use them in an HTML page.

    The CSS only contains the styles nothing else not even <STYLE> tag that we normally use to define styles inside a page.

    I think it is better if you check the basics of CSS.

  6. #6
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Kind of, yes.

    everything in your <head> that is <style="text/css"> you remove and put in a new file named whatever.css and upload that to the server (minus the <style=blah blah stuff..), then put codeex's css code in the <head> section.

    Leave the <body> alone.

    If you want to see a "quick" and less cluttered version of the application look at this page: Test Page Now view the source code (View >> source or page source) and notice the reference to the css file:

    Code:
    <link rel="stylesheet" type="text/css" href="cwot.css">
    I have named my CSS file "cwot" and in the head section this is the only reference to any style sheet.

    in the body I have given a css class to my tables (first and second)

    now if you go here you can view the css file itself and see where (bottom) I have classified the .first and .second as well as through out I have defined all ofther page styles.

    Hope that gives you a better understanding

    <EDIT> THIS LINK will teach you the basics of CSS and how to apply it to a page </EDIT>
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #7
    Join Date
    Jul 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK. I uploaded the head stuff to my server and names it menucss.css I removed the above from the head of my site. I replaced that code with
    <link rel="stylesheet" type="text/css" href="menucss.css">
    Left the body code where it was. Uploaded the page. The mouse over stuff is not working. I have tried 3 different times.
    What am I doing wrong?

  8. #8
    Join Date
    Jul 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'll read the info you sent when I have time later. I bookmarked it.

  9. #9
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    First, the javascript stuff needs to stay on the page, not in the CSS.

    Second remove the <style> tags from your css, and replace all the "#" with "."

    your css should look something like:

    Code:
    .popitmenu{
    position: absolute;
    background-color: FFFFDD;
    border:1px solid black;
    font: normal 14px Arial ;
    line-height: 15px;
    z-index: 100;
    visibility: hidden;
    }
    
    .popitmenu a{
    text-decoration: underline;
    padding-left: 6px;
    color: #800000;
    display: block;
    }
    
    .popitmenu a:hover{ /*hover background color*/
    background-color: #CCFF99;
    }
    Start with that then read the links provided in here for a better understanding of what is going on and what you should and shouldn't put in the css file
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  10. #10
    Join Date
    Jul 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ok...

    I just copied and pasted the code that was on the original pop it menu page. It all works fine. Does exactly what I want it to do except I don't want to upload all everytime I add a page.
    The java stuff is what will need to be changed everytime I add a new page correct?
    So if I leave that on the page everytime I have to add a new page I would have to put it on the page.
    So I'm not sure I understand what your telling me. If I put the java stuff on the page how will it work when I need to add something to it?
    Sometimes I am a bit dense but when that light turnes on...oh baby..it all comes together.

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
  •