473,707 Members | 2,377 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 1846

"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
4182
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 different Name than the LOGFONT.
1
3485
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 not support intelligent font matching, or if there is some other cause. In the example shown...
3
26565
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 object? -- Wim
6
1920
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 ideas are appreciated. The application is creating an image object and Response.OutputStream them.
6
2426
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 printings using Crystal Reports .rpt-files of my application, and using Printing.PrintDocument too. I'm...
4
1942
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
9440
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
2722
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
2833
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 the fonts i want. If i cahnge the printer to the printer that
16
1876
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
9289
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9158
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9060
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
7921
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6615
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
4454
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3151
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
2508
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2096
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.