13 replies [Last post]
gamemaster
gamemaster's picture
Offline
Regular
Last seen: 9 years 25 weeks ago
Timezone: GMT+1
Joined: 2011-01-10
Posts: 12
Points: 15

Hey all,

I'm new to this forum and new to css and I already have 3 really newby questions. ;]

I have 2 div blocks. One of them is automaticly positioned above the other one.
Q1: How can I make the 2nd div block be positioned on the right side of the other one in stead of under the other one?

Q2: I want the bottom of the div block reach to the bottom of the page. How can I do that?

Q3: How can I make objects be positioned on a centain % of the width of the page?

Thanks already for answering and my appologies that I couldn't find this on my own. ;]

wa9578
wa9578's picture
Offline
newbie
Last seen: 9 years 25 weeks ago
Joined: 2011-01-10
Posts: 4
Points: 5

am kind of nooby myself but

am kind of nooby myself but I'll try and help;

1) with the second one ad a div ID i.e ''<div id="example"></div>'' and in the css put #example { position:right;}

2) just don't put anything after the div block
3) in the object div type width: 100px (or if % I think its just width: 50% etc)

like I say am nooby myself and dare say the guru's will edit/delete my post and put up the proper thing (if I'm wrong) but figured give you something to try

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 3 weeks 3 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2043
Points: 2268

wa9578 wrote:... #example {

wa9578 wrote:

... #example { position:right;} ...

Well, there's no such thing as position:right; so forgive me if I discount the rest.

Stock answers ahoy!

gamemaster wrote:

How can I make the 2nd div block be positioned on the right side of the other one in stead of under the other one?

Give both DIVs a width and float the first DIV left.

gamemaster wrote:

I want the bottom of the div block reach to the bottom of the page. How can I do that?

Faux columns.

gamemaster wrote:

How can I make objects be positioned on a centain % of the width of the page?

Define the widths above as percentages.

wa9578
wa9578's picture
Offline
newbie
Last seen: 9 years 25 weeks ago
Joined: 2011-01-10
Posts: 4
Points: 5

that could be why some of my

that could be why some of my stuff isn't working properly lol... that or I was looking in wrong bit, but hey we were all noobs once, stated I'd probably be wrong but was something to try whilst those who know best were busy.

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 3 weeks 3 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2043
Points: 2268

wa9578 wrote: that could be

wa9578 wrote:

that could be why some of my stuff isn't working properly lol... that or I was looking in wrong bit, but hey we were all noobs once, stated I'd probably be wrong but was something to try whilst those who know best were busy.

Yes, of course. It's everyone's job to point out misinformation, in fact there is even a bit of what could be considered misinformation in my post above. It's a common occurrence that should be understood though. Let's see if it's discovered. Cool

gamemaster
gamemaster's picture
Offline
Regular
Last seen: 9 years 25 weeks ago
Timezone: GMT+1
Joined: 2011-01-10
Posts: 12
Points: 15

Well thanks for the quic

Well thanks for the quic replies both! ;]

@ Verschwindende
The 1st and 3rd answeres worked but what do you mean by Faux columns?
I googled it real quic and they only tell me to say height: 300px or something. I already tried height: 100% before posting this but it ain't working.

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 3 weeks 3 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2043
Points: 2268

gamemaster wrote: ... I

gamemaster wrote:

... I googled it real quic and they only tell me to say height: 300px or something.

Well, I'd say you didn't google faux columns then. Tongue

gamemaster
gamemaster's picture
Offline
Regular
Last seen: 9 years 25 weeks ago
Timezone: GMT+1
Joined: 2011-01-10
Posts: 12
Points: 15

Oh, I think I get it now. So

Oh, I think I get it now.
So you change the background color so that it looks like both colums are of the same height?

The only problem I don't really get is that the divs are different colors, but when 1 of them doesn't reach the bottom, the other one also won't?

Sorry for the newbyness xD

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 3 weeks 3 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2043
Points: 2268

gamemaster wrote: ... The

gamemaster wrote:

... The only problem I don't really get is that the divs are different colors, but when 1 of them doesn't reach the bottom, the other one also won't? ...

I'm not sure I get what you're asking. If you've tried faux columns already post what you have and show me the trouble.

gamemaster
gamemaster's picture
Offline
Regular
Last seen: 9 years 25 weeks ago
Timezone: GMT+1
Joined: 2011-01-10
Posts: 12
Points: 15

The problem is that I don't

The problem is that I don't know how this would work.

I have the 2 divs next to each other. And what I read on the internet page is that you make a 3rd div to fill up the background. But I just want the colors of the divs to reach the bottom of the page, also when the text in those divs doesn't reach the bottom of the page.

I hope you understand because my english is kinda crappy.
Thanks already for your help though. ^^

regia
regia's picture
Offline
Enthusiast
San Diego
Last seen: 5 years 8 weeks ago
San Diego
Timezone: GMT-4
Joined: 2010-10-24
Posts: 313
Points: 360

Did you read this

gamemaster
gamemaster's picture
Offline
Regular
Last seen: 9 years 25 weeks ago
Timezone: GMT+1
Joined: 2011-01-10
Posts: 12
Points: 15

Oh on the other sites they

Oh on the other sites they explained it with a different solution.

Thanks a lot ya'll! ^^

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 3 weeks 3 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2043
Points: 2268

gamemaster wrote: Oh on the

gamemaster wrote:

Oh on the other sites they explained it with a different solution.

HAHA. Please show me the other sites so I can berate them mercilessly. Just a quick pointer, A List Apart is #1 on the list of google results for "faux columns" for a reason.

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

for the reason that it

for the reason that it published the original article all those long dark years ago

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