E
ekazda
Okay, I know this can't be that hard... or can it? :stupido:
What I have are three elements within a custom CMS (I'm using some .net objects, but that doesn't matter in regards to what I am trying to do):
------
LABEL
DIV
FILE UPLOAD
------
I'm using the DIV to return information regarding any current image that may already exist on the server. If no image exists, I simply hide the DIV. If an image does exist, I display the DIV.
NOW, this DIV is style to have a nice border, some padding, and a pretty BG color. What I would like to do is SNAP THE WIDTH of the DIV to match the CONTENT (a hyperlink).
Using DISPLAY:INLINE snaps the width to the content PERFECTLY. However, it makes the layout change to the following:
------
LABEL DIV
FILE UPLOAD
------
That's no good.
Without DISPLAY:INLINE, the DIV stretches to match its container, which is 100%.
SO, the question is how do I maintain the BLOCK characteristics of the DIV, but simply snap the width to the content (WITHOUT JAVASCRIPT).
What I have are three elements within a custom CMS (I'm using some .net objects, but that doesn't matter in regards to what I am trying to do):
------
LABEL
DIV
FILE UPLOAD
------
I'm using the DIV to return information regarding any current image that may already exist on the server. If no image exists, I simply hide the DIV. If an image does exist, I display the DIV.
NOW, this DIV is style to have a nice border, some padding, and a pretty BG color. What I would like to do is SNAP THE WIDTH of the DIV to match the CONTENT (a hyperlink).
Using DISPLAY:INLINE snaps the width to the content PERFECTLY. However, it makes the layout change to the following:
------
LABEL DIV
FILE UPLOAD
------
That's no good.
Without DISPLAY:INLINE, the DIV stretches to match its container, which is 100%.
SO, the question is how do I maintain the BLOCK characteristics of the DIV, but simply snap the width to the content (WITHOUT JAVASCRIPT).