473,782 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Aligning line spacing following different font sizes on the same line

Now and again I like to start a sentence with a large capital, maybe
in a different font. This upsets the line spacing and I've failed to
find any css that will effectively crop the capital letter from the
bottom, to allow the line spacing of the following smaller font text
to remain unaffected. I've always had to resort to a graphic for the
leading capital - is there a way I can do this with css?

Thanks

John
Jul 20 '05 #1
2 3700
John wrote:
Now and again I like to start a sentence with a large capital, maybe
in a different font. This upsets the line spacing and I've failed to
find any css that will effectively crop the capital letter from the
bottom, to allow the line spacing of the following smaller font text
to remain unaffected. I've always had to resort to a graphic for the
leading capital - is there a way I can do this with css?


I think you might want the first-letter pseudo-element:

http://www.w3.org/TR/CSS21/selector.html#first-letter

I'm not sure how well supported it is in browsers. You don't really want
to crop the letter (which to me means cut off part of it), do you?
Jul 20 '05 #2
Hey Paul - thanks - I think this is exactly what I want. The only
reason I mentioned cropping is that the leading capital when
highlighted showed white space below which I attributed to the font
itself, rather than its line spacing, so was seeking some way of
trimming it off. But the Pseudo thing does away with all that malarky
and seems just what I need - thanks again.

John
Paul <pa***********@ blueyonder.couk > wrote in message news:<M7******* **********@fe1. news.blueyonder .co.uk>...
John wrote:
Now and again I like to start a sentence with a large capital, maybe
in a different font. This upsets the line spacing and I've failed to
find any css that will effectively crop the capital letter from the
bottom, to allow the line spacing of the following smaller font text
to remain unaffected. I've always had to resort to a graphic for the
leading capital - is there a way I can do this with css?


I think you might want the first-letter pseudo-element:

http://www.w3.org/TR/CSS21/selector.html#first-letter

I'm not sure how well supported it is in browsers. You don't really want
to crop the letter (which to me means cut off part of it), do you?

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2959
by: Jeff Thies | last post by:
It seems that there can be too many words on a line. This is a problem with pages that are not fixed width. There seems to be a few problems. 1) Finding where the next line starts after finishing a long line. 2) The pages just look too wordy and it is tiring to read. I would think that there are already "formulas" for word count, lineheight
16
2184
by: C.W | last post by:
I have a top box element that houses the web site title: #top_section { height: 20px; padding: 10px; text-align: left; background: navy; color: white; }
9
4174
by: PinkBishop | last post by:
I have included my .css script below. This is my first attempt at CSS. The pages look fine through they eyes of PC browsers and NS on the Mac. On IE and Safari for Mac all hell breaks loose. I am getting huge amounts of white space between lines probably
7
7116
by: Danny | last post by:
I have a small <div> element which contains two text blocks - one within <h5> tags and the other within <p> tags. I don't want any extra line spacing between elements so use the display:inline property. This works for IE6 but Opera7.54 and Netscape7.1 add large line spacing between the text blocks and any lines of wrapped text. The line spacing is independant of the font size and is consistent between all lines. ie: it's not larger...
0
1039
by: Arnold | last post by:
Hi Everybody, I'm experiencing a weird behavior in a Report and was wondering if you've encountered it or know how to combat it. I just have 2 fields in the Detail section, "ReportDate" and "Progress." In the Page Header, I've recreated a form that, traditionally, has been filled out by hand. The form contains 27 horizontal lines spaced evenly apart.
1
3046
by: Eric | last post by:
I have a user control (with three controls inside it) that appears multiple times in the containing page. Sometimes I want to hide the rightmost control in the UC but if I do that it screws up the horizontal alignment of the other two controls. It appears that they are being stretched due to the absence of the others and I'm not sure how to fix it. If I dont hide anything it looks all lined up (each line is a web user control): Label ...
1
2675
by: Edward | last post by:
I created a simple CSS layout (code and example below) for bloggin/writing but ran into five issues that I need help with: 1. How do I get rid of the right-margin red line on the last three right-boxes in Internet Explorer? 2. How can I put a 4px margin BETWEEN the right-boxes, "border-top: 4px" didn't do it and if I put in a "margin-top: 4px;" it shows the red underneath instead of the brown background graphic.
11
3103
by: designkitt | last post by:
Hello, I am having a problem aligning a cell in a table and have tried everything I can think of to correct this without any luck: It appears that the white area, which is an image in the background of this table within a table is shifted slightly to the right. It's driving me crazy. Any help would be greatly appreciated. Here is the url and the code for the whole page: http://kittelbergerdesign.com/indextest.html <html> <head>...
6
3714
by: shapper | last post by:
Hello, I created the following header: http://www.27lamps.com/Beta/Typography/Typography.html Where Font Size is the same as Line Height: 2.0em. Shouldn't the border be next to the text? Thanks,
0
9639
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9479
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10080
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9942
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7492
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6733
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5509
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4043
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3639
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.