Hi,
I had a quick look on Google:
<html>
<head>
<style>
<!--
.textborder {border: 1px solid black; padding: 2px;}
-->
</style>
</head>
<body>
<span class="textborder">Here you go</span>
</body>
</html>
Not sure if it works.
A link or two:
http://www.homeandlearn.co.uk/CSS/css1p8.html
http://www.456bereastreet.com/lab/styling-form-controls-revisited/text-input-single/
Kate
----- Original Message -----
From: "Aldona" <[EMAIL PROTECTED]>
To: <wsg@webstandardsgroup.org>
Sent: Friday, August 29, 2008 6:39 AM
Subject: [WSG] Images & Paragraph Width
Hi,
I have a problem which I feel like I should know but apparently don't. :-)
I have an image which my CSS doesn't know (and will never know) the size
of. The image is in a paragraph with the class of 'img'.
<p class="img"><img src="images/image.gif" alt="pic" /><br />Regular
Image</p>
What I want to do is put a border around the paragraph (not the image so
it goes around the text as well). What happens is the border winds up the
width of the whole page even though I have margin and padding set to zero.
The CSS is:
p.img{
padding: 0.3em;
margin: 0em;
border: 2px solid red;
font-size: 0.9em;
}
How can I stop the border stretching the entire width of the page.
Unfortunately in this case float is not an option and I have a limitation
in that the HTML needs to remain as basic as possible. The CSS can be as
complicated as anything but the HTML needs to be simple.
Hopefully someone will have come across this problem before and be able to
point me in the right direction.
Thanks to all.
IceKat.
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************