Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Calling All Css Experts (i Need Some Help)
KansukeKojima
post Jan 16 2008, 11:01 PM
Post #1


Privileged Member
*********

Group: [HOSTED]
Posts: 528
Joined: 13-October 06
From: Alberta, Canada
Member No.: 31,584



Ok, whenever I try to code a web site using <div></div> tags I run into one problem... the only run vertically... laying on top of one another...... I know there is a way to get div tags to run side-by-side... but how?

(Diagram of what I mean)
When I attempt:
CODE
*************************
Banner
*************************
*************************
Content Area
*************************
Content Different Content Area
*************************


What I want to happen:

CODE
*************************
Banner
*************************
Content Area     *   Content Area
                        *
                        *
                        *

so what css (or whatever else) to get it like that...?
Go to the top of the page
 
+Quote Post
sonesay
post Jan 16 2008, 11:24 PM
Post #2


|||[ n00b King ]|||
*********

Group: [HOSTED]
Posts: 689
Joined: 20-June 07
From: Auckland
Member No.: 45,102



In your example (2 column) you float content area left and right

CODE

<div id='cont_left'>
</div>
<div id='cont_right'>
</div>


CODE

#cont_left{
float:left;
}
#cont_right{
float:right;
}


I think with this method though its going to float all the way to the right and left. so its probably best to have an empty content container with a defined with
say 600 px if you want it that wide over all


CODE

<div id='cont'>
<div id='cont_left'>
</div>
<div id='cont_right'>
</div>
</div>


CODE

#cont{
width:600px;
}
#cont_left{
float:left;
}
#cont_right{
float:right;
}


ok unless there is some positioning available to control how far wide out they float and it works well then you dont need to use the above example.

This post has been edited by sonesay: Jan 16 2008, 11:31 PM
Go to the top of the page
 
+Quote Post
KansukeKojima
post Jan 16 2008, 11:38 PM
Post #3


Privileged Member
*********

Group: [HOSTED]
Posts: 528
Joined: 13-October 06
From: Alberta, Canada
Member No.: 31,584



ok what about padding between them... just like a center float div... or what....

Go to the top of the page
 
+Quote Post
sonesay
post Jan 16 2008, 11:55 PM
Post #4


|||[ n00b King ]|||
*********

Group: [HOSTED]
Posts: 689
Joined: 20-June 07
From: Auckland
Member No.: 45,102



You can just define the left and right divs width to equal a value that gives enough space in between them.
Go to the top of the page
 
+Quote Post
jlhaslip
post Jan 17 2008, 04:50 AM
Post #5


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 4,077
Joined: 24-July 05
From: Linix, DOS and Windows…the good, the bad and the ugly
Member No.: 9,787
Spam Patrol



Here is a sample code showing paragraph tags instead of div's, but the concept is the same since p tags are block level like Div tags. Div's are a generic container, whereas paragraphs deal with text.

CODE
<p style="float: left; border: 1px solid red; width: 300px;">
                        float:left paragraph
                    </p>
                    <p style="float:right; border: 1px dashed red;">
                        float:right paragraph
                    </p>
                    <p>
                        non-floated paragraph
                    </p>

Try it out in your template. Of course, you could move the styles to an external CSs file nand give the p's classes according to their behaviour...

Hope this helps.
Go to the top of the page
 
+Quote Post
KansukeKojima
post Jan 18 2008, 07:09 PM
Post #6


Privileged Member
*********

Group: [HOSTED]
Posts: 528
Joined: 13-October 06
From: Alberta, Canada
Member No.: 31,584



thanks to both of you.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Calling All Authors!(5)
  2. Any Travian Players Here?(0)
  3. Runescape Cheats From Players(4)
  4. Calling all University students...(15)
  5. Free Long Distance Calling From Computer To Phone(4)
  6. Image Calling Problem Solved(1)
  7. Calling All Bf2142 Clans!(0)
  8. Calling All Internet Marketing Newbies!(0)
  9. Calling All Game Modders!(0)
  10. Calling Shellexec(2)
  11. Skype Enables Video Calling(8)
  12. Calling A False Variable...(6)
  13. Calling A Variable From A Dynamic List In A Sql Statement(2)
  14. Artists Corner [Calling All Deviants](13)
  15. Calling All Php Programmerss Help Needed(2)


 



- Lo-Fi Version Time is now: 7th October 2008 - 09:39 PM