473,383 Members | 1,798 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,383 software developers and data experts.

Problems with Borders using CSS

Hello,

I am validating my webpages for HTML 4.01 Transitional. I have the
problem that I cannot remove a border on a small graphic on my page. I
have researched various websites for the correct CSS code but none
seems to work.

The HTML code:

<img class="YelArLL" alt="">

The CSS code:

..YelArLL {
BACKGROUND-IMAGE: url('Images/YellowArrowLowerLeftHeader.png');
BORDER-COLLAPSE: collapse;
height: 14px;
width: 16px;
margin: 0px;
padding 0px;
color: #000000;
border-style: none;
}
Take a look at the webpage to see what it looks like. (http://
www.skydiving.co.uk/tandem2.htm)
Its the small yellow arrow on the left side with a border. Notice the
other arrows are fine when done without CSS. Any ideas?

Cheers, Simon

Mar 28 '07 #1
14 2600

<si************@googlemail.comwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
Hello,

I am validating my webpages for HTML 4.01 Transitional. I have the
problem that I cannot remove a border on a small graphic on my page. I
have researched various websites for the correct CSS code but none
seems to work.
The CSS code:

.YelArLL {
BACKGROUND-IMAGE: url('Images/YellowArrowLowerLeftHeader.png');
BORDER-COLLAPSE: collapse;
I would replace the above line in your css -border:none;
Take a look at the webpage to see what it looks like. (http://
www.skydiving.co.uk/tandem2.htm)
Its the small yellow arrow on the left side with a border. Notice the
other arrows are fine when done without CSS. Any ideas?

Cheers, Simon
HTH
Vince Morgan
Mar 28 '07 #2

<si************@googlemail.comwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
.YelArLL {
BACKGROUND-IMAGE: url('Images/YellowArrowLowerLeftHeader.png');
BORDER-COLLAPSE: collapse;

I would replace the above line in your css -border:none;
Looking more closely at the image on the site, it could actualy be the
anchor border that is visible.
If that's the case then you will need to do the same for the anchor too.
Give it a class with the same border attribute.
Take a look at the webpage to see what it looks like. (http://
www.skydiving.co.uk/tandem2.htm)
Its the small yellow arrow on the left side with a border. Notice the
other arrows are fine when done without CSS. Any ideas?

Mar 28 '07 #3
Scripsit si************@googlemail.com:
I am validating my webpages for HTML 4.01 Transitional.
That's a start, but you should also use correct CSS (and to aim at HTML 4.01
Strict if feasible). And you should actually produce valid markup, not just
"validate".
I have the
problem that I cannot remove a border on a small graphic on my page.
Well, on Firefox, there is no border - but no graphic either.
I have researched various websites for the correct CSS code but none
seems to work.
You haven't used the W3C CSS Validator. It would report the syntax errors,
which should be fixed before more complicated troubleshooting.
Alternatively, use Firefox and view the console log (error log) via the
Tools menu.
BORDER-COLLAPSE: collapse;
That's formally correct but has no effect, since it only affects tables.
padding 0px;
That's malformed (no colon).
Take a look at the webpage to see what it looks like. (http://
www.skydiving.co.uk/tandem2.htm)
It looks messy. So? The markup is messy, too, and so is the CSS code. Even
with tools like CSS checkers, you will have difficulties in maintaining the
page, due to its unnecessary complexity.

For example, if you want to use yellow arrows as item markers, why don't you
just use list markup and set list-style-image?

Followups trimmed to c.i.w.a.s.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Mar 28 '07 #4
Unfortunately that did not work. Hmm?

Mar 28 '07 #5
Thanks Jukka,

I appreciate there is too much complexity on the page. I am precisely
using the W3C validator to check for errors and this is how I noticed
the error. I will keep looking for a solution to this.

Simon

Mar 28 '07 #6

<si************@googlemail.comwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
Hello,

I am validating my webpages for HTML 4.01 Transitional. I have the
problem that I cannot remove a border on a small graphic on my page. I
have researched various websites for the correct CSS code but none
seems to work.
As Jukka previously mentioned your markup and your css need a good clean up.

Something very curious.
"<img class="YelArLL" alt=""><br>"
The class in question is being applied to the above tag, but I don't see any
image there.
The image tag below that has no class, but it's the one with the yellow
arrow image.

HTH
Vince Morgan

Mar 28 '07 #7
Inside the CSS file you will find the image. I did another experiment
and created an almost blank page with just 2 examples with CSS and
without. The problem still exists.

This is the HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>New Page 1</title>
<link href="styleTS.css" rel="stylesheet" type="text/css">

</head>

<body>
<img class="YelArLL" alt=""><br>Cannot remove border - using CSS<p>
<img border="0" src="Images/YellowArrowLowerLeftHeader.png" width="16"
height="14"><br>
Border - without CSS but not W3C compliant</p>
</body>

</html>

This is the CSS:

..YelArLL {
BACKGROUND-IMAGE: url('Images/YellowArrowLowerLeftHeader.png');
height: 14px;
width: 16px;
border: none;
margin: 0;
padding: 0;
}

Its still not working....
Simon

Mar 28 '07 #8
BACKGROUND-IMAGE is for the BODY Tag. You can't use it for the IMG tag.
See my other reply to you.

--
David Berry
FrontPage Support: http://www.frontpagemvps.com/

<si************@googlemail.comwrote in message
news:11**********************@l77g2000hsb.googlegr oups.com...
Inside the CSS file you will find the image. I did another experiment
and created an almost blank page with just 2 examples with CSS and
without. The problem still exists.

This is the HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>New Page 1</title>
<link href="styleTS.css" rel="stylesheet" type="text/css">

</head>

<body>
<img class="YelArLL" alt=""><br>Cannot remove border - using CSS<p>
<img border="0" src="Images/YellowArrowLowerLeftHeader.png" width="16"
height="14"><br>
Border - without CSS but not W3C compliant</p>
</body>

</html>

This is the CSS:

.YelArLL {
BACKGROUND-IMAGE: url('Images/YellowArrowLowerLeftHeader.png');
height: 14px;
width: 16px;
border: none;
margin: 0;
padding: 0;
}

Its still not working....
Simon
Mar 28 '07 #9
<si************@googlemail.comwrote in message
news:11**********************@l77g2000hsb.googlegr oups.com...
<body>
<img class="YelArLL" alt=""><br>Cannot remove border - using CSS<p>
<img border="0" src="Images/YellowArrowLowerLeftHeader.png" width="16"
height="14"><br>
Border - without CSS but not W3C compliant</p>
</body>

</html>

This is the CSS:

.YelArLL {
BACKGROUND-IMAGE: url('Images/YellowArrowLowerLeftHeader.png');
Hmmm,, I feel somewhat silly right now.
That's a background image. Why didn't I notice that earlier :)
I don't think that is what you are after at all.

try replacing;
"<img class="YelArLL" alt=""><br>Cannot remove border - using CSS<p>"
with;
"<img class="YelArLL" alt="" src="Images/YellowArrowLowerLeftHeader.png"
then remove;
"BACKGROUND-IMAGE: url('Images/YellowArrowLowerLeftHeader.png');"
from the class.

I think I want it to work now more than you do :)
Mar 28 '07 #10
On 28 Mar, 14:45, "David Berry" <dbe...@mvps.orgwrote:
BACKGROUND-IMAGE is for the BODY Tag. You can't use it for the IMG tag.
Rubbish. The background-image property is applicable to all sorts of
element, and certainly for <img>
--
David Berry
FrontPage Support: http://www.frontpagemvps.com/
That explains a lot. 8-(

Mar 28 '07 #11
Scripsit si************@googlemail.com:
<link href="styleTS.css" rel="stylesheet" type="text/css">
Are we supposed to guess the base address?

Please post URLs, not fragments of code; quote or paraphrase what you are
commenting on; and select _the_ best group for you messages (I helped you
this time by setting followups).

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Mar 28 '07 #12
In article
<11**********************@n59g2000hsh.googlegroups .com>,
"Andy Dingley" <di*****@codesmiths.comwrote:
On 28 Mar, 14:45, "David Berry" <dbe...@mvps.orgwrote:
BACKGROUND-IMAGE is for the BODY Tag. You can't use it for the IMG tag.

Rubbish. The background-image property is applicable to all sorts of
element, and certainly for <img>
--
David Berry
FrontPage Support: http://www.frontpagemvps.com/

That explains a lot. 8-(
I want to know if he appreciates how cutting a remark this is?
How can I find out?

--
dorayme
Mar 28 '07 #13
On Wed, 28 Mar 2007 10:49:18 GMT scribed:
Hello,

I am validating my webpages for HTML 4.01 Transitional. I have the
problem that I cannot remove a border on a small graphic on my page. I
have researched various websites for the correct CSS code but none
seems to work.

The HTML code:

<img class="YelArLL" alt="">

The CSS code:

.YelArLL {
BACKGROUND-IMAGE: url('Images/YellowArrowLowerLeftHeader.png');
BORDER-COLLAPSE: collapse;
height: 14px;
width: 16px;
margin: 0px;
padding 0px;
color: #000000;
border-style: none;
}
Take a look at the webpage to see what it looks like. (http://
www.skydiving.co.uk/tandem2.htm)
Its the small yellow arrow on the left side with a border. Notice the
other arrows are fine when done without CSS. Any ideas?

Cheers, Simon
Well, you first need an image to be able to remove the "border".
Where's your src?

--
Neredbojias
He who laughs last sounds like an idiot.
Mar 29 '07 #14
I see. I will try to put the SRC command in. Yes maybe I should have
put the full URL in. I am falible unfortunately!

But thanks to all who have made suggestions. I will let you know how I
get on.

Simon

Mar 29 '07 #15

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

Similar topics

2
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...
4
by: David Ross | last post by:
In my <http://www.rossde.com/inflation.html>, I have a small table in the middle of the page. This page is composed without a DOCTYPE statement at the beginning. The table borders appear to my...
8
by: kaeli | last post by:
I have had a little free time lately to revisit a problem I have with the 3 column layout plus a header and footer. See this example: http://glish.com/css/7.asp There is a header and 3...
2
by: Jacob | last post by:
I'm trying to create an MDI form where the MDI area dosn't have the traditional 3D borders. I thought at one point the code I had in the form constructor was working, but now I'm getting an MDI...
5
by: tshad | last post by:
I have been trying to figure out what the Datagrid is doing to create its formatting. I found that some of my Datagrids have a 3D type of border and sometime it has a straight line. I finally...
0
by: M.A | last post by:
Hello, I'm joining multiple images to a whole one using Graphics classes DrawImage method. Unfortunately DrawImage leaves borders in those places where images are combined. How could I prevent...
2
by: cbjewelz | last post by:
Hey. I'm creating a horizontal boxed CSS menu for my site using lists. I wish to achieve a main menu bar something like this: http://kurafire.net/log/ however when I add borders to my code it...
9
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...
12
by: Amer Neely | last post by:
I'm trying to nail down a 3-column layout but there is a slight discrepancy in how IE 6 and Seamonkey renders a border. View my attempt at http://www.softouch.on.ca/scratch/3-columns.html The...
2
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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...

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.