|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#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 |
|
|
|
|
|
#2 |
|
Barefoot on the Moon!
Staff
Premium Member
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.
|
|
|
|
|
|
#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 |
|
|
|
|
|
#4 |
|
Chop Chop
|
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 |
|
|
|
|
|
#5 |
|
Member (9 bit)
Join Date: Nov 2004
Location: Flint, MI
Posts: 256
|
Made changes and uploaded, no difference.
^fo |
|
|
|
|
|
#6 |
|
Chop Chop
|
Try in the style: table { width: auto; }
That might mess up some other stuff though. |
|
|
|
|
|
#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 |
|
|
|
|
|
#8 |
|
Chop Chop
|
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:
PHP Code:
Last edited by catacon; 06-25-2005 at 06:42 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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|