Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

displaying <div>s beside each other...

Status
Not open for further replies.

sumilsay

Technical User
Feb 12, 2003
69
0
0
CA
hey peeps. my question for today is...

how do i get 2 <div>s to align beside each other. a break is automatically put in.

here is my code:

html-
<div class="title_left"></div><div class="title_right"></div>

css-
div.title_left{
background-image: url(images/title_left.jpg);
width: 448px;
height: 163px;
position: relative;
}

div.title_right{
background-image: url(images/title_right.jpg);
width: 307px;
height: 163px;
position: relative;
}

thanks for you time everyone.
CHEERS!
 
not sure about <div>, but I find <span> can usually achive what most uses of <div> can ...

<span id="span1">hello</span>
<span id="span2">there</span>
 
well a span is inline -- where you can use multiple spans on one line but a DIV is a block element -- just like <p>

you would use css to align your divs where you want but to just use divs and expect them to line up next to each other without specifying layout is not possible

zzzzzz
 
do spans work in firefox? cuz mine arent and im not sure if they even can. sawry!!! but thanks again...
 
firefox???

if this for a personeal site that you users have to use firefox to enjoy it or is this for the public?

span works for NN and IE (current versions of course and older ones too).

zzzzzz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top