Hi,
I have an image and I would like to draw a border around it, I tried:
<p style="border:1 px border-style:solid; border-color:#EEEEEE;
background-color:#FFFFFF;" ><img src="./images/header.jpg" width="800"
height="130" border="0" ><br>
but I don't get a border, why not? Where am I going wrong?
Thank you!
--
chEErs roN
I'm root, I'm allowed to do this! ;)
keep on rockin' 7 2207
roN schreef: Hi,
I have an image and I would like to draw a border around it, I tried: <p style="border:1 px border-style:solid; border-color:#EEEEEE; background-color:#FFFFFF;" ><img src="./images/header.jpg" width="800" height="130" border="0" ><br> but I don't get a border, why not? Where am I going wrong? Thank you!
Walk this way:
<p><img src="./images/header.jpg" width="800"
height="130" border="0" style="border: 1px solid #EEEEEE;" /><br></p>
Watch the shortened css-markup (and the closure of the p-tag)
--
Niek
'sNiek wrote: <p><img src="./images/header.jpg" width="800" height="130" border="0" style="border: 1px solid #EEEEEE;" /><br></p>
Watch the shortened css-markup (and the closure of the p-tag)
Watch the border="0" in there - sure you need it? ;-)
--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
roN wrote: I have an image and I would like to draw a border around it,
It's generally best to include the border into the image itself.
It can be done in CSS, too, though.
I tried: <p style="border:1 px border-style:solid; border-color:#EEEEEE; background-color:#FFFFFF;" ><img src="./images/header.jpg" width="800" height="130" border="0" ><br> but I don't get a border, why not? Where am I going wrong?
1) You are trying to set the border on the paragraph, not the image.
(There's a difference. A paragraph has 100% width by default.)
2) You have a syntax error in the style sheet (missing semicolon after
"1px"). Use the W3C "CSS Validator" to detect syntax errors in future.
3) You have invalid markup: no alt attribute. This does not affect the
rendering, though, except when the image is not displayed.
4) You are setting background-color without setting color. This may
matter when the alt text, rather than the image, is displayed.
It's questionable whether <p> (paragraph) markup is adequate here. It
might if the alt attribute's value is a full paragraph's worth of text.
More normally, you would write
<div><img
alt="ACME International"
src="images/header.jpg"
style="border: solid #eee 1px; background: #fff; color: #000"
width="200" height="130"></div>
(If the image acts as a top-level heading for the page, use <h1> instead
of <div>.)
Els wrote: 'sNiek wrote:
<p><img src="./images/header.jpg" width="800" height="130" border="0" style="border: 1px solid #EEEEEE;" /><br></p>
Watch the shortened css-markup (and the closure of the p-tag)
Watch the border="0" in there - sure you need it? ;-)
Eh.. and the <br> not having any purpose right before </p> (I think
the original example was taken from a piece of code with more lines
after the image within the same paragraph), and the 'XHTMLisation' of
the image element, while the rest is/was in plain HTML.
Oh, and the missing alt attribute.
Hmm.. yup, that's about it I think :-)
--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
Els wrote: Els wrote:
'sNiek wrote:
<p><img src="./images/header.jpg" width="800" height="130" border="0" style="border: 1px solid #EEEEEE;" /><br></p>
Watch the shortened css-markup (and the closure of the p-tag)
Watch the border="0" in there - sure you need it? ;-)
Eh.. and the <br> not having any purpose right before </p> (I think the original example was taken from a piece of code with more lines after the image within the same paragraph), and the 'XHTMLisation' of the image element, while the rest is/was in plain HTML. Oh, and the missing alt attribute.
Hmm.. yup, that's about it I think :-)
Hmm yup, thank you guys,
I now have following:
<img src="./images/header.jpg" width="800" height="130" border="1"
style="border: 1px solid border-color:#EEEEEE;" >
but the border stays black, why? I would like to have it light grey.
Thank you!
--
chEErs roN
I'm root, I'm allowed to do this! ;)
keep on rockin'
roN skrev: <img src="./images/header.jpg" width="800" height="130" border="1" style="borde r: 1px solid border-color:#EEEEEE;" > but the border stays black, why? I would like to have it light grey
<img src="./images/header.jpg" width="800" height="130"
style="border: 1px solid #EEEEEE">
--
Topposter du svar, dvs. skriver dit svar over det citerede,
så ryger du på min ignoreringslist e.
Svar under det du citerer og citer kun det du svarer på - tak. http://usenet.dk/netikette/citatteknik.html
Knud Gert Ellentoft <el*******@mail .tele.invalid> wrote in
news:v6******** *************** *********@dtext .news.tele.dk: roN skrev:
<img src="./images/header.jpg" width="800" height="130" border="1" style="border : 1px solid border-color:#EEEEEE;" > but the border stays black, why? I would like to have it light grey
<img src="./images/header.jpg" width="800" height="130" style="border: 1px solid #EEEEEE">
Yep, got rid of the deprecated border attribute and fixed the css
syntax error (missing semi-colon), but still missing alt which is a
required attribute of <img>. If there is no appropriate alternate text
to use, at least use alt="".
--
Stan McCann, "Uncle Pirate" http://stanmccann.us/
Webmaster, NMSU at Alamogordo http://alamo.nmsu.edu/
Now blocking Google Grouper posts and replies. http://blinkynet.net/comp/uip5.html This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: JLahm |
last post by:
I have defined a class for my images called .image that specifies the
default border color, width and style. I'd like to be able to have the
pseudo elements link, visited and active have one color and style, while
the hover class has a different color and style. I have the entries:
a:link .image {
border-color: #151515;
border-style: solid;
border-width: 2px;
}
|
by: Lars Forslin |
last post by:
I have a problem with making image hyperlinks work in Firefox/Netscape. It
seems the clickable area is narrowed down to a small area in the middle of
the image, around the edges or gone altogether. Very irregular. It seems to
be the worst if images are wrapped into nested divs.
Take a look at http://www.monarda.se/webb.htm All the images are linked to
the different sites they represent. The ones at the right are wrapped in
divs, the ones...
|
by: Karl Burrows |
last post by:
I am working on a Website for a non-profit group and for some reason I have
one link that doesn't want to cooperate. All the image links work fine with
the onmouseover and onmouseout script except one. Maybe I am just getting
blurry-eyed, but can someone help me figure out what I have done wrong?
Thanks!!!!
<td width="190" height="57"><a href="Trends.htm"
onmouseover="chgImg('Trends','InteriorTrendsBold')"...
|
by: John Thompson |
last post by:
We're sooo close. When we load the page to upload the image, all of
the prms go through except the binary image data. Using SQL server
with the data type set to "image".
Please help!
Thanks-
John
|
by: abdullah1983 |
last post by:
Hi Guys,
I need some clarification regarding the problem with safari browser.
Please find my code below. I'm setting the image src, mouseover and
mouseout using javascript. The mouseover and mouseout are working
perfect but only the source is not setting using java script. Please
clarify me regarding this.
PS: This problem is only for safari browser.
<tr>
| |
by: cjparis |
last post by:
Hello everyone. If anyone can give me a hand I would be gratefull
Am doing a site which requires a moving element and have used DHTML to do it. Have a simple Browser detect script to sort IE from Netscape. IE is ok but the Netscape browser including Firefox and Safari are not working now. Not sure why. The idea is that when you mouseover the arrows the gallery div moves to left and right.
I have changed the script and now the image...
|
by: punitshrivastava |
last post by:
Hi to All,
I am Punit Shrivastava.i created one html page for this i cde like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>kj-issue-52-200602 copy.jpg</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
|
by: Evolution445 |
last post by:
I got this code, and it somehow doesnt work.
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
<TR>
<TD background="{image-path}navfiller.gif" HEIGHT=40 width="50%"></TD>
<TD width="110"><a href="index.php"><IMG SRC="{image-path}matrix_03.gif" WIDTH=110 HEIGHT=40 ALT="Homepage" border="0" onmouseover="myOn('matrix_03')" onmouseout="myOut('matrix_03')"></a></TD>
<TD width="100"><a...
|
by: studentofknowledge |
last post by:
For some unknown reason ie is placing images I have in a div in a weird way. One image is overlapping another but this problem is not occuring in mozilla. I have looked at my code over and over again but cant seem to find out what the problem is. I think this could be fixed with a i.e hack??? please advise
the problem of the overlapping image is occuring in imagerow2 div on line 56. please see my code below
here is my html
<!DOCTYPE...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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...
| |
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,...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |