473,473 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Underlined links

Is there anyway to control the underline on links? I know how to get rid
of them but mine seem to be too close to the bottom of the font. The
line is touching the font. On other sites this is not the case.

The thing I'm worried about is this only happens on a Windows browser.
It looks normal/correct on my mac IE 5.1.

The page is my first dive into CSS, so it might be something I've done
wrong there.

Here is the page under construction:

http://aem.cornell.edu/business_site...rs/c_index.htm

Thanks

Steve
Jul 20 '05 #1
11 3127
Steve K <sm***@cornell.edu> wrote:
Is there anyway to control the underline on links?
Luckily most browsers give such a control to users.
I know how to get rid of them
Maybe, maybe not.
but mine seem to be too close to the bottom of the font.
The position of the underline is determined by the browser. There are
plans to add properties to CSS for this in CSS 3, but that's just
drafting and won't turn into anything useful on the WWW for a few
years.
The line is touching the font.
This depends on the font, and on the browser.
http://aem.cornell.edu/business_site...rs/c_index.htm


Sanity check: I try to increase font size using IE's Font Size button.
It fails. Ergo, the page (the CSS) fails. I would suggest that you
start working with this real problem. The FAQ is a good starting place.
Don't forget to use a CSS checker to detect the syntax errors that you
now have.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #2
In article <Xn****************************@193.229.0.31>, "Jukka K.
Korpela" <jk******@cs.tut.fi> wrote:
Thanks, I'm real close to just doing the whole site the old way, plain
old html. I'm quite new to CSS and the more I learn about it the more I
realize how much there is to it. Right now I'm in over my head.

Steve K <sm***@cornell.edu> wrote:
Is there anyway to control the underline on links?


Luckily most browsers give such a control to users.
I know how to get rid of them


Maybe, maybe not.
but mine seem to be too close to the bottom of the font.


The position of the underline is determined by the browser. There are
plans to add properties to CSS for this in CSS 3, but that's just
drafting and won't turn into anything useful on the WWW for a few
years.
The line is touching the font.


This depends on the font, and on the browser.
http://aem.cornell.edu/business_site...rs/c_index.htm


Sanity check: I try to increase font size using IE's Font Size button.
It fails. Ergo, the page (the CSS) fails. I would suggest that you
start working with this real problem. The FAQ is a good starting place.
Don't forget to use a CSS checker to detect the syntax errors that you
now have.

Jul 20 '05 #3
On Thu, 23 Oct 2003 12:01:52 -0400, Steve K wrote:
Is there anyway to control the underline on links? I know how to get rid
of them but mine seem to be too close to the bottom of the font. The
line is touching the font. On other sites this is not the case.

The thing I'm worried about is this only happens on a Windows browser.
It looks normal/correct on my mac IE 5.1.

The page is my first dive into CSS, so it might be something I've done
wrong there.

Here is the page under construction:

http://aem.cornell.edu/business_site...rs/c_index.htm


Few things:
a:hover {text-decoration:none; color:cc0000;}
should be
a:hover {text-decoration:none; color: #cc0000;}

..floatleft { float: left; margin: 0 10px 5px 0; }
should be
..floatleft { float: left; margin: 0px 10px 5px 0px; }
(if we're being pedantic)

..floatquest { float: left; margin: 2px 9px 2px 2px; align="absmiddle"}
align="absmiddle" isn't CSS.

font size: 7pt; line-height: 14pt;
you'd be much, much better to use
font-size: 100%; line-height: 100% (or not specify line-height at all)

Proportional font sizes scale much better (pt sizes don't scale). I'm sure
there's an FAQ somewhere... someone will tell us where it is. The same
goes for the margins - using ex measurements (1ex = height of an x) means
the page scales properly.

You're missing an ; after uppercase.

I'll leave the HTML as this is the CSS group.

Visually, the page looks a bit crampt. This is because of the line-height
you specified, you're best to leave this out.

'Search' and 'Topics' look a bit out of place, because they're images and
the rest of that menu is text. Consider making them text, too.

<pedantic stuff>
You're inconsistent with the dashes:
top--firms
start-ups -- for careers
possible--even
</ps>

"Want to know..." and "Willian D Perez..." paragraphs have overlapping
text because the line-height it too small. This might be because I don't
have Verdana.

I think the table of companies has a too small font.

Sorry to be pedantic, but that's just me :-)
In brief:
* remove all the line-height bits
* Don't set font sizes with pt. Use em, ex or %.

That will probably make a big improvement.

HTH, HAND :-)

--
Matt
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 20 '05 #4
On Thu, 23 Oct 2003 13:57:29 -0400, Steve K wrote:
In article <Xn****************************@193.229.0.31>, "Jukka K.
Korpela" <jk******@cs.tut.fi> wrote:
Thanks, I'm real close to just doing the whole site the old way, plain
old html. I'm quite new to CSS and the more I learn about it the more I
realize how much there is to it. Right now I'm in over my head.


If there's more than one page, use this in the <head> of the document:

<link rel="stylesheet" type="text/css" media="all" href="style.css">

And move what's between the <style> and </style> into a text document
called style.css in the same folder as the HTML page (or change the href=
accordingly).

This means you can use the stylesheet for lots of pages, and changing it
once will affect all of them. I would suggest this stylesheet:

a:link {
color: black;
text-decoration: underline;
}
a:visited {
color: #999;
}
a:hover {
text-decoration: none;
color:c00;
}
a:active {
color: #999;
}

..floatleft {
float: left;
margin: 0ex 1.5ex 0.7ex 0ex;
}
..floatright {
float: right;
margin: 0ex 0ex 0.7ex 1.5ex;
}
..floatquest {
float: left;
margin: 0.1ex 1.5ex 0.1ex 0.1ex;
}
..quote {
margin: 0ex 0ex 0ex 12ex;
font-size: 0.9em; /*if it _must_ be smaller*/
color: c00;
margin-top: 0ex;
}
..quoteb {
text-align: right;
margin: 1ex 0ex 0ex 0ex;
font-size: 0.9em;
color: c00;
margin-top: 0ex;
margin-right: 3ex;
font-weight: bold;
}
..quote1 {
margin: 0ex 0ex 0ex 5ex;
font-size: 0.9em;
color: c00;
}
..border {
margin: 2ex 0ex 2ex 0ex;
}
..space {
margin: 3ex 0ex 0ex 0ex;
}

..boldtable, .boldtable td, .boldtable th {
font-size: 0.95em;
color: #000;
}
..boldtable2 {
font-size: 0.95em;
color: #000;
border: 0.1ex solid #f00;
margin: 0.2ex;
}

..td1 {background: #ffe9d4;}

body {
font-family: sans-serif;
font-size: 1em; /*not necessary, I'm just emphasising it*/
}

h1 {
color: #c00;
font size: 1.3em;
font-weight: bold;
}
h2 {
color: #000;
font-size: 1.2em;
font-weight: bold;
margin-top: 2.5ex;
}
h3 {
color: #000;
font size: 1.1em;
margin-top: 2.5ex;
margin-bottom: 1ex;
font-weight: bold;
}
p {
font-size: 1em;
}
p.italic {
/* don't use this, use <em>stuff</em> in the HTML, which is italic by
default for visual browsers and is better markup, e.g. for blind people: it
denotes emphasis, rather than just a paragraph with style.*/
}

and so on...

NOTE: I've just guessed the dimensions, I can't really visualise pixels
because they're a different size on different screens (which is one reason
why you shouldn't use them). Same goes for points.

see <http://213.162.109.93/help/cornell.html>
I'm amazed at how similar it is.

There's a few errors in the HTML though:
<http://validator.w3.org/check?uri=http%3A%2F%2F213.162.109.93%2Fhelp%2Fcor nell.html&charset=%28detect+automatically%29&docty pe=HTML+4.01+Transitional>

Hope that helps (it bloody well should ;-)

--
Matt
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 20 '05 #5
Matt wrote:
[snip]
.floatleft { float: left; margin: 0 10px 5px 0; }
should be
.floatleft { float: left; margin: 0px 10px 5px 0px; }
(if we're being pedantic)

[snip]

Why?

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #6
On Thu, 23 Oct 2003 21:49:29 +0100, Barry Pearson wrote:
Matt wrote:
[snip]
.floatleft { float: left; margin: 0 10px 5px 0; } should be
.floatleft { float: left; margin: 0px 10px 5px 0px; } (if we're being
pedantic) [snip]

Why?


IIRC all lengths should have a unit.

Quote from <http://www.w3.org/TR/CSS21/syndata.html#length-units> The format of a length value (denoted by <length> in this specification)
is a <number> (with or without a decimal point) immediately followed by a
unit identifier (e.g., px, em, etc.). After a zero length, the unit
identifier is optional.


Well, I'm wrong, it's optional. I was being ultra-pedantic anyway, and I
think it's good practice to specify units where applicable.

Not that it's relevant, really, but 0 Celsius != 0 Fahrenheit != 0 Kelvin.

--
Matt
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 20 '05 #7
On Fri, 24 Oct 2003, Matt wrote:
After a zero length, the unit identifier is optional.
Well, I'm wrong, it's optional. I was being ultra-pedantic anyway,


I disagree, and I speak as a fully paid-up pedant. ;-)
and I think it's good practice to specify units where applicable.
It's arguable. But I'll ofer you a free tip: when you claim to be
offering a pedantic reply, *do* take advantage of this fine Web thingy
to consult the authoritative documents, before posting.

Offering "good practice" guidance can be useful (though it's arguable
whether it was useful here); but clothing it in false attire of a
"pedantic" reply is not helpful.
Not that it's relevant, really, but 0 Celsius != 0 Fahrenheit != 0 Kelvin.


You're quite right: in this context, it's not relevant.

all the best
Jul 20 '05 #8
Matt wrote:
On Thu, 23 Oct 2003 21:49:29 +0100, Barry Pearson wrote:

Well, I'm wrong, it's optional. I was being ultra-pedantic anyway, and I
think it's good practice to specify units where applicable.
The key is "where applicable" - any unit on 0 does not make a difference
except that it just adds additional text chars to your CSS.

I don't see any reason to do this.

Not that it's relevant, really, but 0 Celsius != 0 Fahrenheit != 0 Kelvin.


As another poster said its not relevant but lets take your example anyways.

0 Kelvin = -273 Celcius = -459 Fahrenheit
0 Fahreinheit = -18 Celcius = 255 Kelvin
0 Celcius = 32 Fahrenheit = 273 Kelvin

On the other hand in CSS:

0px = 0
0 = 0

So what's your point? How does this in any way help your argument?

--Nikolaos

Jul 20 '05 #9
Nikolaos Giannopoulos <ni******@solmar.ca> wrote in
news:4a********************@magma.ca:
Matt wrote:
On Thu, 23 Oct 2003 21:49:29 +0100, Barry Pearson wrote:

Well, I'm wrong, it's optional. I was being ultra-pedantic anyway,
and I think it's good practice to specify units where applicable.


The key is "where applicable" - any unit on 0 does not make a
difference except that it just adds additional text chars to your CSS.

I don't see any reason to do this.


Maintainability. If you later decide to change the value from zero to
something else, you're less likely to inadvertently leave off the unit or
use the wrong unit.
Jul 20 '05 #10
Eric Bohlman wrote:
Nikolaos Giannopoulos <ni******@solmar.ca> wrote in
news:4a********************@magma.ca:
The key is "where applicable" - any unit on 0 does not make a
difference except that it just adds additional text chars to your CSS.

I don't see any reason to do this.


Maintainability. If you later decide to change the value from zero to
something else, you're less likely to inadvertently leave off the unit or
use the wrong unit.


I disagree - if you change a "0" to something else surely you will see
that you don't have any units "immediately" next to it.

e.g. .blah {margin: 10px 0 0 5px}

You are suggesting that you can do the following without realizing you
have no units - I imagine you can but then you can equally type anything
in place of an integer also.

..blah {margin: 10px 10 0 5px}

That you may quickly change something "without thinking" and not add the
units can happen but that this causes a maintentance issue is a little
too much IMO.

Maintenance is a huge issue in many respects however most often its an
issue when changing something has an impact somewhere else - the impact
here is exactly where you make the change i.e. right under your cursor ;-)

IMO, I could "see" someone arguing consistency (for no reason other than
asthetics) - but not maintainability.

--Nikolaos

Jul 20 '05 #11
Matt <ma**********@hotmail.com> wrote in message news:<pa****************************@hotmail.com>. ..
p.italic {
/* don't use this, use <em>stuff</em> in the HTML, which is italic by
default for visual browsers and is better markup, e.g. for blind people: it
denotes emphasis, rather than just a paragraph with style.*/
}


More importantly, not all languages denote emphasis through the use of
italics (in Chinese, for example, emphasis is denoted through a dot
under each character being emphasised) - so in a future world where
machine translation has advanced to a reliable state, the use of
logical mark-up is even more important.

It seems strange that you promote logical mark-up in this part of the
stylesheet, and yet don't comment on the use of the 'quote' classes
rather than using <blockquote> in the page.

--- Stephen Morley ---
http://www.safalra.com
Jul 20 '05 #12

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

Similar topics

0
by: EDienske | last post by:
Hi all, I can't seem to get underlined text to work with the <TEXTPATH> tag (see snippet below). According to Micrsoft you should just be able to add "text-decoration:underline" to the style...
3
by: addi | last post by:
All, I have seen the feature on many sites and would like to implement it for myself as well, where if a mouse is moved over a hyperlink, it gets underlined. For example, in my code, if the...
9
by: David Ross | last post by:
In some cases, I indicate links with both a small image and also text, both in the same anchor. When I upgrade my pages to incluce DOCTYPE for HTML 4.01 transitional, the underline for the link...
2
by: AlanF | last post by:
We have defined access keys for both our menu choices and buttons. However, when the menu displays, the access key "underline" on the menu does not display until we press the ALT key. We can toggle...
0
by: Valerie Hough | last post by:
I have derived a class from MenuItem so that I can associate IDs of my choosing with each item (a la C++). I have created a ContextMenu in the constructor of an owner draw list box and added a...
3
by: db_from_mn | last post by:
I'm creating a main menu in C#. When I put an ampersand (&) ahead of a character in a menuitem name, the following character is underlined, as expected, in the design view. When I run the app...
2
by: Prisy | last post by:
Is it possible to have the text of the first-letter in an <asp:button> underlined? I was able to do the following to get the first letter underlined: <STYLE type="text/css">...
0
by: John A Grandy | last post by:
visual studio .net 2003 somehow i have changed my vs.net vb.net code-editor configuration so that squiggly underlined errors no longer show the error message when the cursor is placed on them...
8
by: roN | last post by:
Hi, I wanna have some links on my page NOT underlined but they are and my defintion looks like: A:link { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-style:...
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
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...
1
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...
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,...
1
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...
0
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...
0
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 ...
0
muto222
php
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.