Unstoppable Domains

I need some quick HTML help

Spaceship Spaceship
Watch

Stefan

Account Closed
Impact
0
Hey guys. I have a simple problem with displaying DIVS. This is my problem; I would like the two divs to be displayed together on one line without using tables (cause tables suck). Here is some example code:

Code:
<div>pwnz0rz!</div><div>pwnz0rzdoublaview!</div>

And this displays it like this:

Code:
pwnz0rz!
pwnz0rzdoublaview!

And I want it to display like this:

Code:
pwnz0rz! pwnz0rzdoublaview!

Does anyone know how I can solve this annoying, but probaly simple problem of mine?

+REP plus 1NP$ to whoever helps me. :hehe:

EDIT: Okay I found a way that works for this using CSS, but I'd like to know if there are any other ways of doing this. Here is what I came up with. I made a class called PWNAGE and it was like this:

Code:
.pwnage{ 
display: inline; 
}

So yeah that seems to work. Any other suggestions?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
There's another CSS way to do it..

Code:
div {
 float: left;
}
 
0
•••
Then would the div that I want to be displayed on the right side be
Code:
float: right;
?
 
0
•••
It could be, but it would be as right as possible. (?)

If you had another div around both with a set width, it would go all the way to the right. If they were just in the body, it would be all the way to the right of the page.

Making it float: left; puts it to the left like how you said you wanted it displayed.

The thing about display: inline; is that when you do that you can't set a width or other things that display: block; (which DIV's are) items can.
 
0
•••
HTML:
<div style='width: 20px;'>
<div>Hai2u</div>
<div style='flat: right;'>Blah</div>
</div>
 
0
•••
in <head></head>:
HTML:
<style type="text/css">
.div1 { display: inline; }
.div2 { dispay: inline; }
</style>
in <body></body>:
HTML:
<div class="div1">pwnz0rz!</div>
<div class="div2">pwnz0rzdoublaview!</div>
should work...
 
0
•••
Palyriot said:
in <head></head>:
HTML:
<style type="text/css">
.div1 { display: inline; }
.div2 { dispay: inline; }
</style>
in <body></body>:
HTML:
<div class="div1">pwnz0rz!</div>
<div class="div2">pwnz0rzdoublaview!</div>
should work...

Thats what i was going to say, i have had this problem before, its nothing big and bad!
 
0
•••
Why not just use one div? :-/
Code:
<div>pwnz0rz! pwnz0rzdoublaview!</div>
 
0
•••
Yeah I agree, just stick it all in one div and there should be no problems. However, if you must then use inline.
 
0
•••
I love tables :'(
 
0
•••
For Noobie:

Tables are crap

For Billy:

I'm sure that text was just an example and he really wanted two boxes or something and in that case, you would want two boxes.
 
0
•••
You probably need to use floats for 2 boxes.

I don't think inline would turn out to pretty if you use it for columns or boxes.
 
0
•••
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back