7 replies [Last post]
Sting
Offline
Regular
Last seen: 6 years 44 weeks ago
Timezone: GMT+1
Joined: 2007-12-18
Posts: 16
Points: 0

I want to create a 5 row and 4 column layout with divs.

At the moment i have the following basic code :

blablablablabla

1. Is this basic structure correct ?
2. I want the 5 row / 4 column in the maincontent div. Whats the best way to create such a 5 row / 4 column structure with divs?

the css i used

body, html {
margin:0;
padding:0;
background:#094e77;
color:#000000;
}
body {
min-width:963px;
background-color: #094e77;
background-image: url(images/bg.png);
background-repeat: repeat-x;
font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size: 0.74em
}
#wrap {
margin:0 auto;
width:963px;
}
#header {
background: url(images/top.png);
height: 50px;
}

#logo {
background-image: url(images/bgmain.png);
background-repeat: repeat-y;
margin:auto;
padding-left: 40px;
padding-top: 7px;
}

#navigation {
background-image: url(images/bgmain.png);
background-repeat: repeat-y;
margin:auto;
}

#contentwrap {
background-image: url(images/bgmain.png);
width:963px;
overflow: hidden;
padding-top: 20px;
}

#maincontent {
float:left;
width:550px;
padding-left: 55px;
line-height:155%;
width:550px;
}

3. Are there any mistakes in this CSS code?

DoctorHarvey
Offline
newbie
Last seen: 6 years 47 weeks ago
Joined: 2007-12-28
Posts: 9
Points: 0

It looks fine to me. What is

It looks fine to me. What is going wrong?

Sting
Offline
Regular
Last seen: 6 years 44 weeks ago
Timezone: GMT+1
Joined: 2007-12-18
Posts: 16
Points: 0

Well now I want a 5 row / 4

Well now I want a 5 row / 4 column in the maincontent div.

Whats the best way to create such a 5 row / 4 column structure with divs?

pichote
Offline
newbie
NYC
Last seen: 6 years 47 weeks ago
NYC
Joined: 2007-12-28
Posts: 2
Points: 0

create more divs inside of

create more divs inside of maincontent, and float them against each other, or if rigid, you can also use positioning.

Triumph (not verified)
Anonymous's picture
Guru

Sting wrote:1. Is this basic

Sting wrote:
1. Is this basic structure correct ?
No. There is no html, head, body or doctype.

Sting wrote:
2. I want the 5 row / 4 column in the maincontent div. Whats the best way to create such a 5 row / 4 column structure with divs?
That depends on the content.

Sting wrote:
3. Are there any mistakes in this CSS code?

The CSS validator is free for anyone to use. Give it a try.

Sting
Offline
Regular
Last seen: 6 years 44 weeks ago
Timezone: GMT+1
Joined: 2007-12-18
Posts: 16
Points: 0

1. yes they are in the code,

1. yes they are in the code, but i just posted a snippet, without those elements
2. The content is in column 1 en 3 an image and in column 2 and 4 text about the image in the previous columns
3. thanks, thats what i was looking for

Triumph (not verified)
Anonymous's picture
Guru

Sting wrote:... The content

Sting wrote:
... The content is in column 1 en 3 an image and in column 2 and 4 text about the image in the previous columns ...

I'm not clear on what you are after. Could you explain it in more detail or post a mockup image.

Sting
Offline
Regular
Last seen: 6 years 44 weeks ago
Timezone: GMT+1
Joined: 2007-12-18
Posts: 16
Points: 0

I have this now/

I will explain what i am trying to do:

I have a wrapper div. Inside the wrapper 2 other divs. The first has an image the second text. I want the two divs to be of the same height automatically, depending on the content: if one div gets longer because it has much content then i want the other div the adjust its height so its the same height as the one with the text.

Another point is that i am using

, which is not done, but if i remove them my layout gets messed up.