473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 1826

"Patrick" <va******@netzero.net> wrote in message
news:a3**************************@posting.google.c om...
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.com> 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******@netzero.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******@netzero.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******@netzero.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******@netzero.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******@netzero.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
Neal <ne*****@spamrcn.com> wrote
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?


Neal

Good point made, i see what you mean. You made me aware of something here!

Thanks again for your follow up.

Regards

Patrick
Jul 20 '05 #11
Neal <ne*****@spamrcn.com> wrote
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?


Neal

Good point made, i see what you mean. You made me aware of something here!

Thanks again for your follow up.

Regards

Patrick
Jul 20 '05 #12

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

Similar topics

1
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...
1
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...
3
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...
6
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...
6
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...
4
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... ...
3
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...
1
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, ...
24
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...
16
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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,...

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.