Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Drop Cap

Posted on 2014-03-10
6
Medium Priority
?
192 Views
Last Modified: 2014-03-21
I understand how to use drop cap within <p>, but how do you use drop cap when using document.writeln?
0
Comment
Question by:Barbara69
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39917944
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
 

Author Comment

by:Barbara69
ID: 39918258
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
 
LVL 58

Expert Comment

by:Gary
ID: 39918271
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.

 

Author Comment

by:Barbara69
ID: 39928403
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
 

Author Comment

by:Barbara69
ID: 39928408
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
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 39929553
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

Independent Software Vendors: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question