Discussion
dynamic div(back to index)How can I make a div as wide as the current picture. I'm thinking along the lines of
<div style = "width: <#fbwidth#>">
but this does not work.
posted by Sean on 6 Aug 05 at 11:52 AM
Well this is without testing it, but I believe that <#fbwidth#> will output something like "600". That is cool put for the CSS to work you need to put "px" after it.
Try something like:
<div style="width:<#fbwidth#>px">
- Abraham
http://photos.dizandat.com
posted by Ab on 6 Aug 05 at 9:34 PM
If you want the DIV width to be the same as the image in it, then dont do anyting. Just a simple div like this <div><#something#></div>
posted by M on 7 Aug 05 at 5:53 PM
What you do is this:
<div id="caption" style="width: px;">
To do a relative size (as in, make this div 100px smaller than the image) do this:
<div id="caption" style="width: px;">
I think Daniel's code is being stripped out — use:
<div id="caption" style="width: <?php echo (<#fbwidth#> - 100);?>px;">
posted by
donald on 19 Aug 05 at 1:34 AM
Post a Reply:
(back to index)