2 replies [Last post]
Borkoff
Borkoff's picture
Offline
newbie
Last seen: 12 years 26 weeks ago
Timezone: GMT+3
Joined: 2010-01-08
Posts: 10
Points: 15

Hi!
I have got a feeling that this is easy and it has been asked and answered but I just could not find the revelant words to find something in google.

I have a container (width: 80%(of the body)) centered and on the left side I have a picture fixed width in px and I want to have the other div on the same line with the picture div fill up the rest of space.

How can I accomplish this?

Borkoff
Borkoff's picture
Offline
newbie
Last seen: 12 years 26 weeks ago
Timezone: GMT+3
Joined: 2010-01-08
Posts: 10
Points: 15

found the

found the answer:

#image
{
width:250px;
float:left;
}

#content
{
margin-left:250px;
width: auto;
}

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 38 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

That's the favoured approach

That's the favoured approach and which suits most circumstances.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me