Jump to content

flexible css help


Hig

Recommended Posts

I am having a major brain fart. I am trying to create a text area in a div with an image to the right of it in a div. This is not the problem, the problem is that I want to be able to use this same design with a wider image and have the text div adjust to it. So in other words, I want it to stay a consistent distance from the edge of the image, whether that image is 200px or 300px. I using this in a Joomla template and have one page with portrait layout photos and one with landscape layout.

 

I'm not certain if I am making sense, so take a look at http://www.greeneridgetreefarm.com/ and http://www.greeneridgetreefarm.com/about.htm. I'm trying to put this site into a joomla template.

 

Any assistance to get me past this brain freeze would be much appreciated.

 

Keith

Link to comment
Share on other sites

The general principle should be to create a container for both (basically the white area) then code the div for the image next with float: right and after that you have a div with the text which does not have any float or width. It just moves up into any available space that remains in the white container.

 

description

Text in div

 

I've used inline styles for convenience, but use id or class and separate stylesheet if possible.

The second example in item 10 here http://www.wickham43.net/threecolumns.php shows the principle.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...