css question

  • Started
  • Last post
  • 4 Responses
  • globeriding

    hey. is it possible to set up a class with css where every link specified as that class opens in a new window? or set a class where this doesn't happen? if so, how?

    my problem involves the use of a blogger template- i know, blogger blows, but it does the job easily- and i want to set the date link so that it opens in the same frame/page, and all other links in a new window. so i thought i'd set a class for the links which doesn't open in a new window, and a class for all other links which then do. any ideas? anyone know what the fuck i'm talking about?

  • sparker0

    css is for presentation layer. this can be done by either php, perl or straight from the xhtml markup.

    if you are using blogger (or any other template driven cms/publisher) you should be able to specify on the date anchor tag a target and that will carry over on every post.

    of course, in xhtml all links open in the same window. i believe target is deprecated.

  • globeriding0

    thanks for that. i have been looking into this and now realise that css is for presentation/layout only. *smacks forehead*.
    problem is i can only specify the format of the date tag in the page.. and this is the one i want to remain in the same frame, so needs no "target", and hence needs no changing. target i realise is outdated.
    all other links are being specified by css only, and these are the ones posted in the blog which need to open in a new window.
    check out http://www.newformula.org to see what the problem is. any links which i post to the blog aren't automatically specified to open in a new window. i don't think what i want can be done (easily) however.

  • kodap0

    feel free to use this javascript:
    it makes a new window targeted to each link so you don't have to type always the 'target="new"' on your blog.

    http://www.mdodesign.com/carlos/…

    then put this inside your head tag:
    [script language="JavaScript" SRC="target.js"] [/script]

    then add this to inside your body tag, (inself):

    [BODY onload=eventLoader();targetLinks... bgColor=#FFFFFF ]

    just replace [ with < and paste on your html.

    I hope you got it

    ;)

  • kodap0

    ...it will automaticaly create a new window for any href you create...