Current location: Hot Scripts Forums » General Web Coding » CSS » Positioning Images


Positioning Images

Reply
  #1 (permalink)  
Old 06-12-09, 02:24 PM
SniperTowers SniperTowers is offline
Wannabe Coder
 
Join Date: Dec 2008
Posts: 143
Thanks: 5
Thanked 0 Times in 0 Posts
Positioning Images

How do I put images next to each other.
Here is my CSS:
Code:
#home{
  display: block;
  width: 219px;
  height: 57px;
  background: url("images/home.png") no-repeat 0 0;
}
#home:visted{ 
  background-position: 0 -57px;
}
#home:hover{ 
  background-position: 0 -57px;
}
#home:active{ 
  background-position: 0 -114px;
}
#home span{
  display: none;
}
#nav li.one {background: url("images/homeactive.png") no-repeat;}
#podro{
  display: block;
  width: 219px;
  height: 57px;
  background: url("images/podro.png") no-repeat 0 0;
}
#podro:visted{ 
  background-position: 0 -57px;
}
#podro:hover{ 
  background-position: 0 -57px;
}
#podro:active{ 
  background-position: 0 -114px;
}
#podro span{
  display: none;
}
#nav li.two {background: url("images/podro.png") no-repeat;}
#ljudje{
  display: block;
  width: 219px;
  height: 57px;
  background: url("images/ljudje.png") no-repeat 0 0;
}
#ljudje:visted{ 
  background-position: 0 -57px;
}
#ljudje:hover{ 
  background-position: 0 -57px;
}
#ljudje:active{ 
  background-position: 0 -114px;
}
#ljudje span{
  display: none;
}
#nav li.three {background: url("images/ljudje.png") no-repeat;}
Here is my HTML:
Code:
<ul id="nav">
<li class="one"><a id="home" href="index.html" title="Home"><span>Home</span></a></li>
<li><a id="podro" href="#" title="podro"><span>Podro</span></a></li>
<li><a id="ljudje" href="#" title="ljudje"><span>Ljudje</span></a></li>
</ul>
Currently just display one after the other, how do I display them next to each other?
Reply With Quote
  #2 (permalink)  
Old 06-12-09, 07:10 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
Not tested.

HTML Code:
li
{
display:inline;
}
CSS List

You might also want to use divs and spans instead, since it's navigation.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash: Unable to load Images from other subdomain Robd75 Flash & ActionScript 1 08-05-08 01:49 PM
Loading Images losse Flash & ActionScript 1 06-03-08 05:18 AM
uploading images in a single directory or not? macintosh PHP 15 03-16-08 07:41 AM
Positioning in CSS zoliky CSS 1 01-11-07 07:18 AM
List images and zip before download jaimexyz Script Requests 0 09-01-03 03:01 PM


All times are GMT -5. The time now is 02:22 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.