Yup, I went through that iteration.  I can get one or the other effect, it is 
getting both that seems to be challenging.  Using float, such as you did, does 
get the desired shrink wrapping effect, but can't be centered as best as I know.

On the other hand, providing a width with auto margins allows the black border 
div to be centered, but then it does not shrink wrap so the portrait 
orientation images have much wider black margins.  That is my dilemma.  I can 
probably live with this version, but it is not quite want I want!


--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

...-----Original Message-----
...From: Dawson, Michael [mailto:[EMAIL PROTECTED]
...Sent: Friday, February 04, 2005 8:35 AM
...To: CF-Community
...Subject: RE: Two more CSS questions.
...
...This is what I have so far.  I just can't get the images to center
...within the tan.
...
...<html lang="en-US">
...<head>
...     <title>Untitled</title>
...
...     <style type="text/css">
...             body {
...                     background-color: #ffffe0;
...             }
...
...             img {
...                     border: 2px solid white;
...             }
...
...             .blackBorder {
...                     border: 10px solid black;
...                     float: left;
...                     margin-left: auto;
...                     margin-right: auto;
...             }
...             .tanMatte {
...                     background-color: #d2b48c;
...                     float: left;
...                     width: 250px;
...                     padding: 20px;
...                     text-align: center;
...             }
...     </style>
...
...</head>
...
...<body>
...
...<div class="tanMatte"><div class="blackBorder"><img src="Pic1.jpg"
...alt="" border="0"></div></div>
...<br clear="all">
...Most-Viewed Campgrounds<br>
...Lodgepole Campground<br>
...Salmon Creek Campground<br>
...Union Flat Campground<br>
...<div class="tanMatte"><div class="blackBorder"><img src="Pic2.jpg"
...alt="" border="0"></div></div>
...
...</body>
...</html>
...
...
...-----Original Message-----
...From: Ian Skinner [mailto:[EMAIL PROTECTED]
...Sent: Friday, February 04, 2005 10:12 AM
...To: CF-Community
...Subject: RE: Two more CSS questions.
...
...Nope, no tables, I'm working hard on that! :-)
...
...The image already has a border, the white border.  I'm trying for a
...matting kind of effect.  So, the image has a white border and I am
...trying to get a black matt then a raised border.  I have a div around
...the image with the set padding and the raised boarder.  What I can not
...figure out is how to dynamically shrink the surrounding div to the image
...and still center this entire construct in the tan container.
...
...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:5:146269
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to