SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    Apr 2007
    Posts
    398
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple DIV problem

    Hi Guys,

    I think this will be an easy one for you, but why won't my link sit on the same row as the other text in the div? It's been driving me potty!

    HTML Code:
    <style>
       .xx{
        background: #EEEEEE url(../images/ball.jpg) no-repeat;
    	width:552px;
    	height:25px;
        margin-bottom: 10px;
        margin-left: 3px;
    	border: dashed 1px #999999;
        font-size: 12px;
    	text-indent: 20px;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-weight: bold;
        color: #FF0000;
       }
       
      .more {
      color: #0066CC;
      } 
    </style>
    </head>
    
    <body>
        <div class="xx">
    	<?php echo $row['name'];?> is here <a href="http://www.dhdhd.com" class="more">More Details</a>
    	</div>
    </body>
    </html>
    Thanks

  2. #2
    SitePoint Wizard bronze trophy DaveWoods's Avatar
    Join Date
    Dec 2004
    Location
    Derbyshire - UK
    Posts
    2,651
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seems to sit on the same line for me (tested in IE6 and Firefox) so not sure what the problem is?

    I'd probably code your CSS like this though and specifying a height and font-size in px will cause you problems when resizing text.

    Code:
    <style type="text/css">
       .xx{
        background: #EEEEEE url(../images/ball.jpg) no-repeat;
    	width: 552px;
    	padding: 5px 0px 5px 20px;
        margin-bottom: 10px;
        margin-left: 3px;
    	border: dashed 1px #999999;
        font-size: 75&#37;;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-weight: bold;
        color: #FF0000;
       }
       
      .more {
      color: #0066CC;
      } 
    </style>


Bookmarks

Posting Permissions

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