2 Replies - 720 Views - Last Post: 16 January 2011 - 07:25 AM

#1 davey123   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 103
  • Joined: 24-December 10

How would you do this with divs?

Posted 15 January 2011 - 05:23 PM

Ok im going a little nuts with trying to do this with divs so I thought maybe someone might give me some direction as to how i should start.

This is what I want to do --> http://www.b3designs...kings/howto.jpg

Ive got the first divs down and they are in different colours on my page. You can see what I have so far here... http://www.b3designs...ings/howto.html
You can also check out the code I have so far from that page.

I want 2 sections in each different colored zone on the left of my page. 1 zone is the title the other is a description.

Can anyone help me out?
Im really trying but fail is all I get.

Is This A Good Question/Topic? 0
  • +

Replies To: How would you do this with divs?

#2 Fungle   User is offline

  • D.I.C Regular
  • member icon

Reputation: 265
  • View blog
  • Posts: 337
  • Joined: 06-March 10

Re: How would you do this with divs?

Posted 15 January 2011 - 06:16 PM

Quote

How would you do this with divs?


From what I gather, You want two divs inside one div, but you want to move those divs inside the div.

You can easily move these by using the
padding: ;

code, with it's variants of course e.g..
 padding-left: ;


But you've done a brilliant job so far ^^

/// EDIT

Here is some code I tried on your source code which worked:
#left{
top: 10px;
left: 10px;
position: relative;
height: 70px;
width: 100px;
float: left;
background-color: #fff;
clear:both;
}

#right{
position: relative;
height: 70px;
width: 240px;
right: 10px;
float: right;
background-color: #000;
top: 10px;
}



First I added two divs inside your label div "left" and "right".

Then I used this css code.

What I did is use floats to seperate the two, as well as using relative positioning to move them around the div.

This should help you, Note If you don't understand why it works, please say so that we can help you learn!

This post has been edited by Fungle: 15 January 2011 - 06:29 PM

Was This Post Helpful? 2
  • +
  • -

#3 davey123   User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 103
  • Joined: 24-December 10

Re: How would you do this with divs?

Posted 16 January 2011 - 07:25 AM

Thank you Fungle.

I was having problems doing it like that but I got my page to work, i hope it works!

I have another questions but it doesnt fall into this topic.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1