Reply
border around text only
Old 11-06-2004, 09:51 AM border around text only
Average Talker

Posts: 25
Trades: 0
I want to put a border around text block on my website. Also would like to be able to change colour of this border. To make things clear, I don't want to put a border inside my <td> tag. It should be only around the text itself!! I searched for a solution, but unfortunately I couldn't find something useful. Does anyone has an asnwer to my problem here how I can do that?
internetstudio is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 11-06-2004, 10:16 AM
Unknown.

Posts: 1,693
Trades: 0
The only way to do it would be using CSS...

An example..
HTML Code:
<html>
<head>
<style type="text/css">
<!--
.textborder {
border: 1px solid #000000;
}
-->
</style>
</head>
<body>
<p class="textborder">Some text...Some text...Some text...Some text...Some text...</p>
</body>
</html>
Should be self explanationary

--James
Dark-Skys99 is offline
Reply With Quote
View Public Profile
 
Old 11-06-2004, 01:49 PM
Novice Talker

Posts: 12
Trades: 0
I think this topic need to close ...
Re-Lost is offline
Reply With Quote
View Public Profile
 
Old 11-06-2004, 01:51 PM
Ark
Ark's Avatar
Webmaster Talker

Posts: 563
Name: Ark
Location: USA
Trades: 0
why?
__________________
Ark
DeviantArt
Ark is offline
Reply With Quote
View Public Profile Visit Ark's homepage!
 
Old 08-18-2006, 07:55 AM Re: border around text only
Junior Talker

Posts: 1
Trades: 0
I think what this guy ment is a bit different than using P tag, because P tag stretches not just around text itself, but fills container.

Try using this

HTML Code:
<html>
<head>
<style>
<!--
.textborder {border: 1px solid black; padding: 2px;}
-->
</style>
</head>
<body>

<span class="textborder">Here you go</span>


</body>
</html>
designblast is offline
Reply With Quote
View Public Profile
 
Old 09-03-2009, 05:07 AM Re: border around text only
LadyT's Avatar
Junior Talker

Posts: 2
Location: Cyprus
Trades: 0
Hi

I know this topic is an old one but I have used the code supplied by designblast. Due to me having a <br /> tag in the text my border is not displaying correctly. The border is created twice...once around each line of text. Can someone please help.

<td class="logo" style="padding-bottom: 10px;"><span class="textborder">Text Line 1<br />Text Line 2</span></td>
LadyT is offline
Reply With Quote
View Public Profile
 
Old 09-03-2009, 07:55 AM Re: border around text only
King Spam Talker

Posts: 1,008
Location: Kokkola, Finland
Trades: 0
move the <br /> outside the span?
davemies is online now
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 09-03-2009, 09:53 AM Re: border around text only
LadyT's Avatar
Junior Talker

Posts: 2
Location: Cyprus
Trades: 0
When I saw your reply davmies I thought....'omg ye..how stupid of me'....but nope...that doesn't work, I still have the same issue with the border being created twice .....any other suggestions would be great...i'm going bauld trying to sort this one out.....not very attractive!
LadyT is offline
Reply With Quote
View Public Profile
 
Old 09-03-2009, 09:59 AM Re: border around text only
King Spam Talker

Posts: 1,008
Location: Kokkola, Finland
Trades: 0
wrap all your text in a <p> , drop the remove the span and apply the style to the paragraph
davemies is online now
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Reply     « Reply to border around text only
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.19012 seconds with 13 queries