Derleek Posted August 31, 2008 Share Posted August 31, 2008 Ok. This is related to my previous topic I am designing a text border. The border has some nice intricacies, so in order to make it look proper the div needs to adjust for more content in 25px 'chunks' (best way i can describe it) To clarify, if a div of text can be contained in a 400px By 600px area and 3 lines of text, but the div would normally only expand by 10px. How can I make it automatically adjust to 25px minimum? I have a feeling this might go beyond the scope of CSS and into PHP/javascript. Thought i'd give it a post in the CSS section in case this can be solved with some CSS. Quote Link to comment Share on other sites More sharing options...
dropfaith Posted August 31, 2008 Share Posted August 31, 2008 im not sure im clear on what you want .. you can use min-height{height:300px} which does as it sounds just declares that the object needs to be that height or more other then that to expand a div beyond the normal id use padding i guess Quote Link to comment Share on other sites More sharing options...
Derleek Posted September 1, 2008 Author Share Posted September 1, 2008 no, i'm not looking for min-height. lets say we have an image that has a height of 10px. That image is the vertical border for a div that contains text and has the CSS property 'height: auto;'. I would like this border to only increase in 10px increments so the border has some continuity. Is this beyond the limitations of CSS, it seems like it might be. Is javascript needed here? could this be potentially coded w/ php? Quote Link to comment Share on other sites More sharing options...
haku Posted September 1, 2008 Share Posted September 1, 2008 It is beyond the scope of CSS. Or at least, kind of. You need to set this setting in CSS, but you will need to use either javascript or a server-side language in order to set the CSS setting. Quote Link to comment Share on other sites More sharing options...
Derleek Posted September 1, 2008 Author Share Posted September 1, 2008 thats what i thought, i'll do some brainstorming. I was just curious if there was any cool CSS tricks for this. Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted September 1, 2008 Share Posted September 1, 2008 You can't do this in css, but you can use complex models to achieve an "eye pleasing solution" to this. If you overlay two divs, you can make the outer div expand 25px lower down, and have a gradient or something like that. Get creative! Javascript would be the easy solution. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.