#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    4
    Rep Power
    0

    Inserting text into pages using CSS


    Hi,
    Was wondering if there was any possible way to insert text into a webpage using CSS. I have a website created with over 200 pages so far, and the people I'm creating it for all of a sudden decided that they want a line at the bottom of each page stating their name. I have a CSS created for the background and I was wondering if I could insert a line in that sheet that would add the text to all pages. Is it possible or am I just dreaming? LOL. I'm trying to avoid having to go through all those pages doing copy/paste..hehe.

    If this is not possible, any other ideas or help of any kind would be appreciated.

    Thanks,
    Christa
  2. #2
  3. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    you can by using the content in the :after or :before psuedo-classes
    http://www.w3.org/TR/CSS21/generate.html

    you can see an example of it here http://www.quirksmode.org/css/beforeafter.html

    of course this only works in css2-complaint browsers mozilla, opera, konqueror but not in msie
  4. #3
  5. Twilight Thinking
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2003
    Location
    Oxford UK
    Posts
    656
    Rep Power
    38
    If its just the name, no links, then maybe a background image containingg the text in the body stlye?

    body {
    background: colour url(whatever) center bottom;
    }

    Any use?
    Cheers,
    Dusk

    My portfolio
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    4
    Rep Power
    0
    well...I'm using an image as a background so I have this in my css now:

    body {background-image: url('bg0010.gif')}

    so...could I add a line to insert a text box, an image or something?

    I'm pretty new to css' ..this is pretty much the first time I've used them.


    Thanks,
    Christa
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    4
    Rep Power
    0
    I found one way to do it using:

    body:after {
    display: block;
    content: "my footer"; text-align:center
    }

    BUT it only works in some browsers....it works in my Mozilla browser but not in my EI...maybe future versions of EI will allow it.
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    4
    Rep Power
    0
    Is it possible to put links in CSS?

IMN logo majestic logo threadwatch logo seochat tools logo