2 replies [Last post]
maguskrool
Offline
newbie
Last seen: 13 years 36 weeks ago
Joined: 2006-11-06
Posts: 2
Points: 0

Hi.

I'm trying to build the following layout:

The rectangle in black (B) has a fixed width. The other two, in blue (A and C), have their widths in %. I'd like the margins between the rectangles to be fixed values, but it won't be a problem if they are also in %. I've tried doing this with divs using the float, margin, etc. CSS properties, with limited success. The width of C is the major problem, can anyone help me with this?

Thank you in advance.

João

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 8 years 14 hours ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

float B left. leave C as

float B left. leave C as unfloated with a margin of width(B) + your horizontal spacing requirements.

maguskrool
Offline
newbie
Last seen: 13 years 36 weeks ago
Joined: 2006-11-06
Posts: 2
Points: 0

Thank you for your help,

Thank you for your help, your solution worked just fine.