Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2005
    Thanked 0 Times in 0 Posts

    Lining Up Images in a DIV

    I have my images defined in my .css file and then called in the div so that I can write on them and like them this way

    But the problem is that I seem to be unable to put them side by side because div puts in a line break and span won't show them with their assigned width and height.

    Any help appriciated!

    <title> Dublin Blues || Rugby League Football Club</title>
    <link href="base.css" rel="stylesheet" type="text/css">

    <div id="main_container" style="border:solid 2px black">
    <div class="newsarea" style="border:solid 2px black">


    <div class="welcomeBar" style="border:solid 2px black">


    .mainBackground {
    background-repeat: repeat-x;
    background-color: #284164;

    #main_container {
    background-repeat: no-repeat;
    background-image: url(images/main.jpg);
    background-color: #284164;
    width: 850px;
    height: 520px;
    border: solid 1px black;
    margin: auto;
    .newsArea {
    background-repeat: no-repeat;
    background-image: url(images/main_bg.jpg);
    background-color: #284164;
    margin-left: 10px;
    margin-top: 20px;
    width: 370px;
    height: 455px;
    .welcomeBar {
    background-repeat: no-repeat;
    background-image: url(images/bgRecRed.jpg);
    background-color: #284164;
    width: 500px;
    height: 95px;

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    In a place far, far away...
    Thanked 1,043 Times in 1,019 Posts
    to get block level elements side by side, you need to use the css float property. float:left; should work fine.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts