473,748 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding borders...

I have an anchor using a class that defines a hover subclass. The issue is
that the anchor itself doesn't have any border and when hovered it adds a
border, the problem is that when it adds the border, the text gets shifted.
Does anyone have any idea how to correct this issue? I would like to create
a transparrent or invisible border (spacer) so that there's room for the
visible border to appear when needed but I cannot seem to get it to work.
Visit http://callandermats.adconn.com/ and hover over left links to see what
I mean. The style sheet for this is:

..menu{
font-size:12px;
text-decoration:none ;
}
..menu:hover{
border-style:groove;
border-width:1;
width=100%;
}

Thanks!
Jul 21 '05 #1
58 5911
"Jon Glazer" <jg************ ***@adconn.com> wrote:
I have an anchor using a class that defines a hover subclass. The issue is
that the anchor itself doesn't have any border and when hovered it adds a
border, the problem is that when it adds the border, the text gets shifted.
Does anyone have any idea how to correct this issue? I would like to create
a transparrent or invisible border (spacer) so that there's room for the
visible border to appear when needed but I cannot seem to get it to work.
border-color: transparent; or whatever your background colour is if
you have a solid backgound rather than an image.
Visit http://callandermats.adconn.com/
Lots of syntax errors to fix:
http://validator.w3.org/check?uri=ht...ts.adconn.com/
http://jigsaw.w3.org/css-validator/v...1&profile=css2

Anyway, I see no shifting text in either IE6 or Opera 7.54. In Opera
only the left and right borders show up, not the top and bottom ones,
and the links are all different widths (probably because Opera is
correctly ignoring your bogus width, see below).
and hover over left links to see what
I mean. The style sheet for this is:

.menu{
font-size:12px;
text-decoration:none ;
}
Pixels are a very bad idea for font-size. Percentages, or not setting
a size at all, are much preferable.
.menu:hover{
border-style:groove;
border-width:1;
1 what?
width=100%;
}


Invalid syntax and width doesn't apply to inline elements so pointless

Steve

Jul 21 '05 #2
Wow the syntax errors are funny. The site is totally valid and I cannot
find one truthfull error in that validator tool.

Oh well. It works.

As for the problem I had, I resolved it by creating a border the same color
as the background.

Thanks,
Jon
"Steve Pugh" <st***@pugh.net > wrote in message
news:pa******** *************** *********@4ax.c om...
"Jon Glazer" <jg************ ***@adconn.com> wrote:
I have an anchor using a class that defines a hover subclass. The issue
is
that the anchor itself doesn't have any border and when hovered it adds a
border, the problem is that when it adds the border, the text gets
shifted.
Does anyone have any idea how to correct this issue? I would like to
create
a transparrent or invisible border (spacer) so that there's room for the
visible border to appear when needed but I cannot seem to get it to work.


border-color: transparent; or whatever your background colour is if
you have a solid backgound rather than an image.
Visit http://callandermats.adconn.com/


Lots of syntax errors to fix:
http://validator.w3.org/check?uri=ht...ts.adconn.com/
http://jigsaw.w3.org/css-validator/v...1&profile=css2

Anyway, I see no shifting text in either IE6 or Opera 7.54. In Opera
only the left and right borders show up, not the top and bottom ones,
and the links are all different widths (probably because Opera is
correctly ignoring your bogus width, see below).
and hover over left links to see what
I mean. The style sheet for this is:

.menu{
font-size:12px;
text-decoration:none ;
}


Pixels are a very bad idea for font-size. Percentages, or not setting
a size at all, are much preferable.
.menu:hover {
border-style:groove;
border-width:1;


1 what?
width=100%;
}


Invalid syntax and width doesn't apply to inline elements so pointless

Steve

Jul 21 '05 #3
Re: http://validator.w3.org/check?uri=ht...ts.adconn.com/
Jon Glazer <jg************ ***@adconn.com> wrote:
Wow the syntax errors are funny. The site is totally valid and I cannot
find one truthfull error in that validator tool.


Huh?

You mean that http://callandermats.adconn.com/ isn't missing a bunch of
required attributes (TYPE for STYLE and SCRIPT elements, ALT for IMG
elements)?

That it doesn't use attributes that are not defined in the DTD that it
claims to use (HEIGHT in TABLE and TR elements, BACKGROUND in TD elements)?

That there aren't extraneous <html> and <head> tags in the middle of the
document?

That there aren't missing quotes around attribute values that require
quotes, causing a cascade of problems when the SGML parser tries to parse
the attribute values as markup?
--
Darin McGrew, da***@TheRallye Club.org, http://www.TheRallyeClub.org/
A gimmick car rallye is not a race, but a fun puzzle testing your
ability to follow instructions. Upcoming gimmick car rallye in
Silicon Valley: TRC's 24th Anniversary (Saturday, February 5)
Jul 21 '05 #4
"Jon Glazer" <jg************ ***@adconn.com> wrote:

Upside down posting fixed.
"Steve Pugh" <st***@pugh.net > wrote :
"Jon Glazer" <jg************ ***@adconn.com> wrote:
I have an anchor using a class that defines a hover subclass. The issue
is that the anchor itself doesn't have any border and when hovered it adds a
border, the problem is that when it adds the border, the text gets
shifted.
Does anyone have any idea how to correct this issue? I would like to
create a transparrent or invisible border (spacer) so that there's room for the
visible border to appear when needed but I cannot seem to get it to work.
border-color: transparent; or whatever your background colour is if
you have a solid backgound rather than an image.
Visit http://callandermats.adconn.com/


Lots of syntax errors to fix:
http://validator.w3.org/check?uri=ht...ts.adconn.com/
http://jigsaw.w3.org/css-validator/v...1&profile=css2

Wow the syntax errors are funny.


Yeah, there's a certain gallows humour in examining a really badlt
coded web site.
The site is totally valid
It obviously isn't. If it was valid the validator wouldn't have failed
it.
and I cannot find one truthfull error in that validator tool.
Why not? They're all errors and they're all accurately reported.
Oh well. It works.
How many browsers did you test it in? 1? 2? 3? 10? 100?

I've already given you examples of how your poor coding means that the
page doesn't display as you want in Opera and I now see that Firefox
agrees with Opera.

Did you test with images turned off? (obviously not, unless you think
that black text on a black background counts as working) With
stylesheets turned off? With a user stylesheet? With a larger than
normal font size? With a smaller than normal font size? On a speech
browser? With JavaScript turned off? On a Mac? On Unix? Have you tried
printing the page?
As for the problem I had, I resolved it by creating a border the same color
as the background.


Before or after I suggested doing just that? Just curious as to
whether I totally wasted my time.

Steve

Jul 21 '05 #5
Right. None of those issues are outstanding problems given that they do not
cause errors on any browser (and I tested 8 different ones).

Alt tags are definitely not a requirement.

"Darin McGrew" <mc****@stanfor dalumni.org> wrote in message
news:cs******** **@blue.rahul.n et...
Re: http://validator.w3.org/check?uri=ht...ts.adconn.com/
Jon Glazer <jg************ ***@adconn.com> wrote:
Wow the syntax errors are funny. The site is totally valid and I cannot
find one truthfull error in that validator tool.


Huh?

You mean that http://callandermats.adconn.com/ isn't missing a bunch of
required attributes (TYPE for STYLE and SCRIPT elements, ALT for IMG
elements)?

That it doesn't use attributes that are not defined in the DTD that it
claims to use (HEIGHT in TABLE and TR elements, BACKGROUND in TD
elements)?

That there aren't extraneous <html> and <head> tags in the middle of the
document?

That there aren't missing quotes around attribute values that require
quotes, causing a cascade of problems when the SGML parser tries to parse
the attribute values as markup?
--
Darin McGrew, da***@TheRallye Club.org, http://www.TheRallyeClub.org/
A gimmick car rallye is not a race, but a fun puzzle testing your
ability to follow instructions. Upcoming gimmick car rallye in
Silicon Valley: TRC's 24th Anniversary (Saturday, February 5)

Jul 21 '05 #6

"Steve Pugh" <st***@pugh.net > wrote in message
news:ln******** *************** *********@4ax.c om...
"Jon Glazer" <jg************ ***@adconn.com> wrote:

Upside down posting fixed.
"Steve Pugh" <st***@pugh.net > wrote :
"Jon Glazer" <jg************ ***@adconn.com> wrote:

I have an anchor using a class that defines a hover subclass. The issue
is that the anchor itself doesn't have any border and when hovered it
adds a
border, the problem is that when it adds the border, the text gets
shifted.
Does anyone have any idea how to correct this issue? I would like to
create a transparrent or invisible border (spacer) so that there's room
for the
visible border to appear when needed but I cannot seem to get it to
work.

border-color: transparent; or whatever your background colour is if
you have a solid backgound rather than an image.

Visit http://callandermats.adconn.com/

Lots of syntax errors to fix:
http://validator.w3.org/check?uri=ht...ts.adconn.com/
http://jigsaw.w3.org/css-validator/v...1&profile=css2

Wow the syntax errors are funny.


Yeah, there's a certain gallows humour in examining a really badlt
coded web site.
The site is totally valid


It obviously isn't. If it was valid the validator wouldn't have failed
it.
and I cannot find one truthfull error in that validator tool.


Why not? They're all errors and they're all accurately reported.
Oh well. It works.


How many browsers did you test it in? 1? 2? 3? 10? 100?

I've already given you examples of how your poor coding means that the
page doesn't display as you want in Opera and I now see that Firefox
agrees with Opera.

Did you test with images turned off? (obviously not, unless you think
that black text on a black background counts as working) With
stylesheets turned off? With a user stylesheet? With a larger than
normal font size? With a smaller than normal font size? On a speech
browser? With JavaScript turned off? On a Mac? On Unix? Have you tried
printing the page?
As for the problem I had, I resolved it by creating a border the same
color
as the background.


Before or after I suggested doing just that? Just curious as to
whether I totally wasted my time.

Steve


OOps sorry steve, forgot to mention that, as I was posting the problem a
possible solution occured to me. You just responded too fast for me to say
I got it fixed. Thanks for the help though!

Jul 21 '05 #7
Oh, and one other simple example, there are not extranious <HEAD> tags in
the document. What it is evidently picking up is some javascript that
controls a separate window. One reason I don't trust these things.

Jon
"Darin McGrew" <mc****@stanfor dalumni.org> wrote in message
news:cs******** **@blue.rahul.n et...
Re: http://validator.w3.org/check?uri=ht...ts.adconn.com/
Jon Glazer <jg************ ***@adconn.com> wrote:
Wow the syntax errors are funny. The site is totally valid and I cannot
find one truthfull error in that validator tool.


Huh?

You mean that http://callandermats.adconn.com/ isn't missing a bunch of
required attributes (TYPE for STYLE and SCRIPT elements, ALT for IMG
elements)?

That it doesn't use attributes that are not defined in the DTD that it
claims to use (HEIGHT in TABLE and TR elements, BACKGROUND in TD
elements)?

That there aren't extraneous <html> and <head> tags in the middle of the
document?

That there aren't missing quotes around attribute values that require
quotes, causing a cascade of problems when the SGML parser tries to parse
the attribute values as markup?
--
Darin McGrew, da***@TheRallye Club.org, http://www.TheRallyeClub.org/
A gimmick car rallye is not a race, but a fun puzzle testing your
ability to follow instructions. Upcoming gimmick car rallye in
Silicon Valley: TRC's 24th Anniversary (Saturday, February 5)

Jul 21 '05 #8
"Jon Glazer" <jg************ ***@adconn.com> wrote:
Alt tags are definitely not a requirement.


Of course they're not, but only because they don't exist.
alt attributes on the other hand are mandatory.

Or is this a private page that no one on the actual WWW wil ever look
at?

Steve

Jul 21 '05 #9
"Jon Glazer" <jg************ ***@adconn.com> wrote:
Oh, and one other simple example, there are not extranious <HEAD> tags in
the document. What it is evidently picking up is some javascript that
controls a separate window. One reason I don't trust these things.


Liar.
The page http://callandermats.adconn.com/
has

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--EzCat Styles-->
<style>
.... bunch of CSS
</style>
<script src="homefade.j s"></script>
<html>
<head>

So it does have the <html> and <head> in the middle of the page.

How hard would it be to move them to where they belong?

Steve

Jul 21 '05 #10

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

Similar topics

2
3460
by: Hostile17 | last post by:
I've been trying to figure out a good way to make a CSS layout with nice-looking 1-pixel borders around the table cells. The only broadly compatible way to do this I know of is to have * the border of the table set to zero * the cellspacing of the table set to one * the background color set to black * the table cell background color set to white
2
2418
by: Haines Brown | last post by:
This may seem a pointless question, but I'm trying work around an inconsistency between browsers. I have a template that contains a division that holds a text that sometimes exists and sometimes not. I use top and bottom borders to separate this material from its environment: .header { font-size: smaller; border-bottom: solid black thin;
1
2719
by: Melissa | last post by:
A form in my database has multiple subforms. If any subform has no data, the borders of the subform still display on screen and also are printed if I print the main form. Reports are different. If a subreport has no data, the borders of the subreport do not appear in Print View nor do they print with the report. I need the borders to print whether the subreport has data or not. Is there any way to get the subreport borders to print when a...
1
1743
by: Melissa | last post by:
Sorry if this becomes a repeat! I am having trouble with my newsreader and don't know if this got posted yeserday or not or if anyone responded. A form in my database has multiple subforms. If any subform has no data, the borders of the subform still display on screen and also are printed if I print the main form. Reports are different. If a subreport has no data, the borders of the subreport do not appear in Print View nor do they print...
3
3723
by: grlgeek | last post by:
I have a report for creating the switchboard labels for our phone system receptionist switchboard. The template has 12 records per column. I setup a report that will create the labels and put a dotted line around them so the receptionist can easily cut them out. The report is setup with columns so that 6 columns fit across a page. 12 records per column, 6 columns across a page, each record has a dotted line around the box. The...
1
5847
by: Glen Vermeylen | last post by:
Hi, For a project at school we have to automate the assignment of seats in classrooms to students during the exams. The lady who previously did everything manually kept the layouts of the classrooms in an excel-document: 1 sheet per classroom, and she marked the cells which represent the seats with a border. The problem however is that she sometimes merged cells together to get a better layout.
7
9697
by: steve | last post by:
Hi All I urgently need help on setting datagridview cell borders at runtime I found some code on the web from Programming Smart Client Data Applications with .NET 2.0 by Brian Noyes See below This is what I have been trying to achieve, but when I run it ALL the cell
9
2927
by: Michael Redbourn | last post by:
Hi, I just switched from FP to DW and am very very happy ! So whilst I'm mastering Dreamweaver (gonna be a while yet :-) - I thought that I'd try and find out how to add borders for browers like Firefox which don't support them. Not sure if I've explained the above well but my borders display in IE but not in Firefox.
2
30944
by: nicstel | last post by:
Hello, I'm trying to find documentation about the xlwt (py_excelerator). I want to change the border of some cells. But the only types that I found is: double and dashed. How to do a simple line and what is the all other border type name? "borders: top double, bottom double, left double, right double;" Thank You Nicolas
0
8822
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,...
0
9528
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
9359
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
9310
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
9236
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...
0
8235
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...
0
6072
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
4592
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...
2
2774
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.