Results 1 to 7 of 7

Thread: How to set a bold font

  1. #1
    Join Date
    Apr 2010
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default How to set a bold font

    1) Script Title: Local Time Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex6/localtime.htm

    3) Describe problem:

    How to set a bold font of the time number

    Best regards

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I believe you could do this using CSS to modify the class of the <div> tag or ID of the <span> tag.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Apr 2010
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Thank you for reply

    I tried but failed

    the time number code is:

    PHP Code:
    showLocalTime.prototype.updateContainer=function(){
    var 
    thisobj=this
    if (this.displayversion=="long")
    this.container.innerHTML=this.localtime.toLocaleString()
    else{
    var 
    hour=this.localtime.getHours()
    var 
    minutes=this.localtime.getMinutes()
    var 
    seconds=this.localtime.getSeconds()
    var 
    ampm=(hour>=12)? "PM" "AM"
    var dayofweek=weekdaystxt[this.localtime.getDay()]
    this.container.innerHTML=formatField(hour1)+":"+formatField(minutes)+":"+formatField(seconds)+" "+ampm+" ("+dayofweek+")"

    Where I should place class

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Code:
    Current Server Time:<span id="timecontainer"></span><br />
    Current LA Time:<span id="timecontainer2"></span><br />
    Current New York Time:<span id="timecontainer3"></span><br />
    That's the HTML. This is not related to the Javascript.

    You will use CSS (external .css file or <style>...</style> within <head>) to set properties for the ID 'timecontainer', or you could set the whole thing as a class if you'd prefer, such as in a <div>.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. The Following User Says Thank You to djr33 For This Useful Post:

    yaraco (04-19-2010)

  6. #5
    Join Date
    Apr 2010
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I do it in this way. it works greatly

    PHP Code:
    <b>Current Server Time:<span id="timecontainer"></span></b><br />
    <
    b>Current LA Time:<span id="timecontainer2"></span></b><br />
    <
    b>Current New York Time:<span id="timecontainer3"></span></b><br /> 
    I have another question please.

    In this catagory (Dynamic Drive scripts help) when I get a new thread these

    1) Script Title:

    2) Script URL (on DD):

    3) Describe problem:
    are shown.

    How can I do like that?

    Thanks a lot

  7. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I don't understand.

    Do you want to ask a new question? "How do I post a new question?"

    Or do you want to CREATE a forum/system that has default text like what you see above?
    That is probably a better question to ask somewhere else, like in the PHP area.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #7
    Join Date
    Apr 2010
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Or do you want to CREATE a forum/system that has default text like what you see above?
    That is probably a better question to ask somewhere else, like in the PHP area
    That is exactly what I want. I will ask somewhere else.

    --------

    My Local Time Script is finished, and I save it as php file, and name it "time.php"

    now how to include the file "time.php" in my forum without iframe class, because iframe class give a white background, I want it clear.

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
  •