Results 1 to 2 of 2

Thread: placing HTML code in css.

  1. #1
    Join Date
    Apr 2007
    Location
    Southwest France
    Posts
    29
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default placing HTML code in css.

    I have a small bit of coding (about 4 small lines of html) which I use on every page,
    is it possible to add this in the css file and call on it with an ID/class
    as and when I need to,

    Here is the code if it helps

    cheers

    Steve

    Code:
    <ul>
            <li><a href="http://www.******.com/menu1.html">m1<img class="img-flag" src=m1.gif" /></a></li>
    li><a href="http://www.******.com/menu1.html">m1<img class="img-flag" src=m1.gif" /></a></li>
    li><a href="http://www.******.com/menu1.html">m1<img class="img-flag" src=m1.gif" /></a></li>
    li><a href="http://www.******.com/menu1.html">m1<img class="img-flag" src=m1.gif" /></a></li>
    
    </ul>

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    You can't place HTML code in a stylesheet to be referenced later on. Your best bet would be to either use javascript or a server side language (server side is the best, but javascript should suffice as long as the end user does not turn javascript off in their browser).

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

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
  •