Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

Drop Cap

I understand how to use drop cap within <p>, but how do you use drop cap when using document.writeln?
0
Barbara69
Asked:
Barbara69
  • 3
  • 3
1 Solution
 
GaryCommented:
You would have to write an element (div etc) and style the element inline
e,g,

document.writeln('<div style="add styles here">test</div>')
0
 
Barbara69Author Commented:
I'm not sure I understand. I tried what you suggested and nothing happend. I have document.writeln("Hi, my name is Barbara....") and I want to use drop cap on the H in Hi.
0
 
GaryCommented:
Like this

document.writeln('<div style="float:left;font-size: 75px; line-height: 60px; ">H</div>i, my name is Barbara....')

Open in new window

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Barbara69Author Commented:
Wouldn't it be better to put the style in your suggestion in a css and do a <div class=""> or <p class=""> within the writeln?
0
 
Barbara69Author Commented:
I pressed enter before I was finished. I created a style, put it in my css file and put <p class=""> within the writeln.
0
 
GaryCommented:
Which ever way works best for you, I was just giving an all in one solution.
<style>
div {float:left;font-size: 75px; line-height: 60px;}
</style>
<script>
document.writeln('<div>H</div>i, my name is Barbara....')
</script>

Open in new window

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now