Reply
Constraining Code
Old 05-24-2007, 06:52 PM Constraining Code
Novice Talker

Posts: 7
Name: Adam
I need a code that will keep text constrained to a certain box. What is this called, and where can I find one?
AperNature is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 05-24-2007, 08:23 PM Re: Constraining Code
blue-dreamer's Avatar
Webmaster Talker

Posts: 708
Location: Middle England
here's a simple way of doing it....

<div class="mybox">
<p>My text and content goes here...</p>
</div>

Then the basic CSS...

.mybox {
width: 50% /* alter to your width*/
}
blue-dreamer is offline
Reply With Quote
View Public Profile
 
Old 05-24-2007, 08:43 PM Re: Constraining Code
Novice Talker

Posts: 7
Name: Adam
Quote:
Originally Posted by blue-dreamer View Post
here's a simple way of doing it....

<div class="mybox">
<p>My text and content goes here...</p>
</div>

Then the basic CSS...

.mybox {
width: 50% /* alter to your width*/
}
So, what would the final code be?
AperNature is offline
Reply With Quote
View Public Profile
 
Old 05-25-2007, 10:33 AM Re: Constraining Code
LadynRed's Avatar
Super Moderator

Posts: 6,555
Location: Tennessee
He gave it to you ! Put the text inside the <div>, give the <div> a width and put your text inside the div, your text will be constrained inside the <div>.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-25-2007, 07:10 PM Re: Constraining Code
Novice Talker

Posts: 7
Name: Adam
Quote:
Originally Posted by LadynRed View Post
He gave it to you ! Put the text inside the <div>, give the <div> a width and put your text inside the div, your text will be constrained inside the <div>.
Sorry, it's just that I'm not very good at code.

I need the text to be over an image, and I need the width to be 234 pixels. I can't figure out how to get that to work. Any help?
AperNature is offline
Reply With Quote
View Public Profile
 
Old 05-25-2007, 07:31 PM Re: Constraining Code
DesignQuote.Net's Avatar
Experienced Talker

Posts: 37
Name: Wes
Location: Atlanta
.mybox {
width: 234px;
background-image:url('/images/somedumbbackgroundtile.jpg')
}
__________________
- Webmaster Wes
__________________________________________________ __________________________
LeadFEED | Graphic Design Jobs | Web Design | Freelancing
DesignQuote.Net is offline
Reply With Quote
View Public Profile Visit DesignQuote.Net's homepage!
 
Old 05-25-2007, 08:58 PM Re: Constraining Code
Novice Talker

Posts: 7
Name: Adam
Quote:
Originally Posted by DesignQuote.Net View Post
.mybox {
width: 234px;
background-image:url('/images/somedumbbackgroundtile.jpg')
}
Where does the .mybox go in the code?
AperNature is offline
Reply With Quote
View Public Profile
 
Old 05-26-2007, 04:51 PM Re: Constraining Code
Novice Talker

Posts: 7
Name: Adam
Bump!
AperNature is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Constraining Code
 

Thread Tools

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

vB 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.13968 seconds with 12 queries