Solved

Drop Cap

Posted on 2014-03-10
6
178 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
WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

 

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 500 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

This article discusses how to implement server side field validation and display customized error messages to the client.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Suggested Courses

623 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