Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 06-24-2005, 05:20 PM   #1
Member (9 bit)
 
Join Date: Nov 2004
Location: Flint, MI
Posts: 256
CSS : Border Situation

I put a border around a word and I set the margins and padding, but the border still extends across the central div, no matter how small I set the values. I want the border width to change with the amount of words that are in it, like always extend 1 or 2 em on either side of the word.

^fo
foolishone is offline   Reply With Quote
Old 06-24-2005, 10:07 PM   #2
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
It would help if you posted the code
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
Force Flow is offline   Reply With Quote
Old 06-25-2005, 01:14 PM   #3
Member (9 bit)
 
Join Date: Nov 2004
Location: Flint, MI
Posts: 256
Here's the actual page.

Attached is the HTML.

I haven't tried it on this page in particular, but nothing I have found/tried can make the box around the title, in this case "Boating" dynamic/relative in width to the text that is in it. It's either fixed width or extends across the entire, in this case cell, but also DIV's. Any way to also have it be a +/- a doxen pixels on either side always?

^fo
Attached Files
File Type: txt boating.txt (4.5 KB, 50 views)
foolishone is offline   Reply With Quote
Old 06-25-2005, 03:04 PM   #4
Chop Chop
 
catacon's Avatar
 
Join Date: Jan 2005
Location: St. Louis, MO
Posts: 1,035
Send a message via AIM to catacon Send a message via Yahoo to catacon
Try setting the width to 'auto'. Like: title { width: auto; }

That might do it.
__________________
Main Computer: Intel Core i5 2500K | AsRock Extreme3 Z68 | Corsair Vengeance 2 x 4GB DDR3 1600 | EVGA GTX460 768MB | Western Digital Caviar 750GB 7200RPM SATAII | Mushkin 60GB SSD w/ SRT enabled | Asus 20X DVD Burner | Antec 550W Modular | Cooler Master HAF 912 w/ 4 fans | NXZT Sentry Mesh fan controller | W7 | 2 x 23" LG IPS Monitors

Laptop: Asus EEE 1000HE | 2GB RAM | Ubuntu

Laptop: Lenovo Thinkpad T60p | 4GB RAM | W7
catacon is offline   Reply With Quote
Old 06-25-2005, 03:09 PM   #5
Member (9 bit)
 
Join Date: Nov 2004
Location: Flint, MI
Posts: 256
Made changes and uploaded, no difference.

^fo
foolishone is offline   Reply With Quote
Old 06-25-2005, 03:20 PM   #6
Chop Chop
 
catacon's Avatar
 
Join Date: Jan 2005
Location: St. Louis, MO
Posts: 1,035
Send a message via AIM to catacon Send a message via Yahoo to catacon
Try in the style: table { width: auto; }

That might mess up some other stuff though.
catacon is offline   Reply With Quote
Old 06-25-2005, 04:20 PM   #7
Member (9 bit)
 
Join Date: Nov 2004
Location: Flint, MI
Posts: 256
Where am I putting this?

The table is comprised of 2 columns. If I set the table width to auto, it is going to expand to fill the screen, taking everything with it.

That was my old template. This is my new template, that the solution will be used on. This contains no tables, all CSS. Same situation, how to make the width expand and contract relative to the contents.

CSS for the new template is here.

(The navigation up top is my other question.)

^fo
foolishone is offline   Reply With Quote
Old 06-25-2005, 06:37 PM   #8
Chop Chop
 
catacon's Avatar
 
Join Date: Jan 2005
Location: St. Louis, MO
Posts: 1,035
Send a message via AIM to catacon Send a message via Yahoo to catacon
Actually, I believe auto adjusts the division to the biggest that it needs to be, not to fill the screen. Try not using:
PHP Code:
<class="title">Title</p
Instead use:
PHP Code:
<span class="title">Title</span
The 'p' and 'title' styles may be interfering with each other.

Last edited by catacon; 06-25-2005 at 06:42 PM.
catacon is offline   Reply With Quote
Old 06-25-2005, 07:31 PM   #9
Member (9 bit)
 
Join Date: Nov 2004
Location: Flint, MI
Posts: 256
Made the change and uploaded it, and now it works perfectly, just as I wanted.

Thanks catacon!

(now on to the top navigation)

^fo
foolishone is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:52 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2