473,563 Members | 2,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

font-size with % problem

Hi

I have what seems to be a simple problem but i can't figure it out. I
need to make a header real big so i used the font-size with % and it
gets my header to be the size i want, but right under it i want a
<HR>.
It all works fine in I.E. 6.0 and Opera but not in Mozilla or of
course N.N.
Run the code below in I.E. and then in either Mozilla or N.N. and you
will see my <HR> being way too low below the "Paragraph" in Mozilla or
N.N..
I was practising positionning elements using margin, padding and float
only (And avoiding using position: absolute for a change) but i can't
get that to work.
The fix will have to work in all 4 major browsers listed above.

<html>
<head>
</head>
<body>
<p style="font-size: 700%">
paragraph </p>
<HR>
<p>
This is a paragraph typed for a test.
</p>
</body>
</html>

Thanks to all

Patrick
Jul 20 '05 #1
11 1835

"Patrick" <va******@netze ro.net> wrote in message
news:a3******** *************** ***@posting.goo gle.com...
Hi Run the code below in I.E. and then in either Mozilla or N.N. and you
will see my <HR> being way too low below the "Paragraph" in Mozilla or
N.N..


<p style="font-size: 700%;margin-bottom:0">
paragraph </p>

That should take care of it. Set the margin to a non zero value if you think
it's to close.

Regards,
Jim
Jul 20 '05 #2

"Jim Roberts" <jr******@msn.c om> wrote in message
<p style="font-size: 700%;margin-bottom:0">
paragraph </p>

Change that to 'margin:0'. I tried both but posted the wrong fix.

Regards,
Jim


Jul 20 '05 #3
va******@netzer o.net (Patrick) wrote:
need to make a header real big so i used the font-size with % and it
gets my header to be the size i want, but right under it i want a
<HR>.
It all works fine in I.E. 6.0 and Opera but not in Mozilla or of
course N.N.
Run the code below in I.E. and then in either Mozilla or N.N. and you
will see my <HR> being way too low below the "Paragraph" in Mozilla or
N.N..

<html>
<head>
</head>
<body>
<p style="font-size: 700%">
paragraph </p>
<HR>
<p>
This is a paragraph typed for a test.
</p>
</body>
</html>


I'd be interested to know what font type and size you have as default,
because I was doing a similar thing a few days ago and in Opera 7.23
the font-size "maxed out" at just over 500% and wouldn't get any
bigger.

It wasn't a problem with the font itelf, I could make it much larger
by specifying px values instead of %.

Oh, yeah - it's the margin being 700% bigger, BTW. By now you've
already seen other responses saying that, no doubt.

--
Karl Smith.
Jul 20 '05 #4
On 8 Apr 2004 16:05:31 -0700, Patrick <va******@netze ro.net> wrote:
Hi

I have what seems to be a simple problem but i can't figure it out. I
need to make a header real big so i used the font-size with % and it
gets my header to be the size i want, but right under it i want a
<HR>.


Why not use <h1> or similar markup instead, if it is a heading?
Jul 20 '05 #5
On 8 Apr 2004 16:05:31 -0700, Patrick <va******@netze ro.net> wrote:
Hi

I have what seems to be a simple problem but i can't figure it out. I
need to make a header real big so i used the font-size with % and it
gets my header to be the size i want, but right under it i want a
<HR>.


Why not use <h1> or similar markup instead, if it is a heading?
Jul 20 '05 #6
Hi

To Jim:

-<p style="font-size: 700%;margin-bottom:0">
paragraph </p>

-That should take care of it. Set the margin to a non zero value if
you think
it's to close.

Jim i tried both your fixes and they both work for me. I chose to keep
the margin-bottom one as it's clearer for me what is happening to the
element (It's bottom margin is being changed to 0, opposed to margin:
0 which does work but doesn't indicate which margin.)
Thanks again Jim you fixed my problem.

To Karl:

-I'd be interested to know what font type and size you have as
default,
because I was doing a similar thing a few days ago and in Opera 7.23
the font-size "maxed out" at just over 500% and wouldn't get any
bigger.

Karl i have also noticed the same thing as you.In Opera the header is
definitely smaller as in other browsers but at this point it's big
enough for me. I have so much to learn in other areas of CSS that at
this point it's perfectly fine for me.

To Neal:

-Why not use <h1> or similar markup instead, if it is a heading?

Well two reasons.First i try as much as possible to apply CSS as
opposed to HTML.Second using <H1> would be too small for what i was
trying to do(Unless you were planning on styling the H1).
Thanks for your help.

Thanks to all for your kind help

Regards

Patrick
Jul 20 '05 #7
Hi

To Jim:

-<p style="font-size: 700%;margin-bottom:0">
paragraph </p>

-That should take care of it. Set the margin to a non zero value if
you think
it's to close.

Jim i tried both your fixes and they both work for me. I chose to keep
the margin-bottom one as it's clearer for me what is happening to the
element (It's bottom margin is being changed to 0, opposed to margin:
0 which does work but doesn't indicate which margin.)
Thanks again Jim you fixed my problem.

To Karl:

-I'd be interested to know what font type and size you have as
default,
because I was doing a similar thing a few days ago and in Opera 7.23
the font-size "maxed out" at just over 500% and wouldn't get any
bigger.

Karl i have also noticed the same thing as you.In Opera the header is
definitely smaller as in other browsers but at this point it's big
enough for me. I have so much to learn in other areas of CSS that at
this point it's perfectly fine for me.

To Neal:

-Why not use <h1> or similar markup instead, if it is a heading?

Well two reasons.First i try as much as possible to apply CSS as
opposed to HTML.Second using <H1> would be too small for what i was
trying to do(Unless you were planning on styling the H1).
Thanks for your help.

Thanks to all for your kind help

Regards

Patrick
Jul 20 '05 #8
On 11 Apr 2004 09:19:13 -0700, Patrick <va******@netze ro.net> wrote:

Well two reasons.First i try as much as possible to apply CSS as
opposed to HTML.Second using <H1> would be too small for what i was
trying to do(Unless you were planning on styling the H1).
Thanks for your help.


But H1, H2, etc. have semantic meaning. The markup should reflect the
structure, and then you modify the presentation with CSS. See what I'm
getting at?

<p> is smaller than <h1>, right? So you have to apply CSS anyway. Why not
apply it to the structurally, semantically correct markup?
Jul 20 '05 #9
On 11 Apr 2004 09:19:13 -0700, Patrick <va******@netze ro.net> wrote:

Well two reasons.First i try as much as possible to apply CSS as
opposed to HTML.Second using <H1> would be too small for what i was
trying to do(Unless you were planning on styling the H1).
Thanks for your help.


But H1, H2, etc. have semantic meaning. The markup should reflect the
structure, and then you modify the presentation with CSS. See what I'm
getting at?

<p> is smaller than <h1>, right? So you have to apply CSS anyway. Why not
apply it to the structurally, semantically correct markup?
Jul 20 '05 #10

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

Similar topics

1
4158
by: Justin Van Patten | last post by:
Hello, I am having trouble converting a LOGFONT structure to a System.Drawing.Font object. I'm calling SystemParametersInfo to get the LOGFONT lfntSMCaptionFont from a NONCLIENTMETRICS structure. I seem to be doing this correctly, but when I try to create a System.Drawing.Font object with the Font.FromLogFont, the new Font object has a...
1
3482
by: Stephen | last post by:
I am unable to get intelligent font matching to work. I used a @font-face with a Panose-1 descriptor. I tried it with both Internet Explorer 6 and Firefox on Windows 98 SE. The Panose numbers are from the Windows Registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Panose. I am unsure if I made a coding error, or if the browsers do...
3
26544
by: Wim | last post by:
I would like to store the ListView font in the XML config file. So I have a string variable listFont that stores the font (font.ToString()). It must be a string variable because a Font object cannot be written to the XML config file. Next time the program is started the font is read from the config file. But how to convert the string to a Font...
6
1910
by: ryan.mclean | last post by:
Hi all! I was hoping someone could help me out. What I would like to do is use a font that is not installed on the server, but does reside in my local web. Does that make sense? I would like to take the responsibility off the server administrator and put it back on the developers. I realize I may be asking for the impossible, but any...
6
2419
by: Mika M | last post by:
Hi! I'm trying to print barcodes paper printings of my VB .NET (2003) Windows forms application. Earlier I used Code39.TTF (True Type Font) with VB6, and it was working fine, but now can't get barcodes with VB .NET with the same font !? I downloaded demo .OTF-barcode font (Open Type Font), and using it with VB.NET I can get barcode...
4
1931
by: BobAchgill | last post by:
Is it possible to use a font that is not stored in the windows font directory? I would like to use a font that is stored in my application directory... But this does not seem to work... rtbMyRichTextBox.SelectionFont = New Font(CurDir() + "\" + "MyFont.ttf", 12, FontStyle.Bold) Thanks!
3
9432
by: dave | last post by:
Hello: I have array of Label controls allocated danamically. When I'm trying to change font as: LabelLeft.Font.Strikeout = false; I have error: "Property or indexer 'System.Drawing.Font.Strikeout' cannot be assigned to
1
2717
by: Henry Jones | last post by:
I found some code to change the font on a button to bold: private void btnBold_Click(object sender, System.EventArgs e) { btnCalculate.Font = new Font(btnCalculate.Font, btnCalculate.Font.Style | FontStyle.Bold);
24
2822
by: Tony Girgenti | last post by:
Hello. Developing a Windows Form program in VS.NET VB, .NET Framework 1.1.4322 on a windows XP Pro, SP2. Before printing a document, i want to set the font to a font that is only available with the printer that i am printing to(Zebra TLP2844). When i open Word and look at the fonts available for the default printer, it does not show...
16
1856
by: carlbernardi | last post by:
Hi, I was wondering if there is way use a font that is somehow kept in the code instead of having to load it? I am working on a single script that so far can produce images and html but I have not been able to figure out a way that it can also produce a font. Thanks Carl
0
7664
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...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7948
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...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
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...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
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
1
1198
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.