Jump to content

CSS Alignment


chelnov63

Recommended Posts

I have the following code:

 

<div style="width: 420px; height: 275px; overflow:auto;">
<span>01/01/70</span><span class='stuff' style='padding-left:45px'>This is a long title</span> <span style='padding-left:95px'><a href='news.php?id=5'>Read More</a></span><br>
<span>01/01/70</span><span style='padding-left:45px'>small title</span> <span class='stuff' style='padding-left:95px'><a href='news.php?id=4'>Read More</a></span><br>
</div>

 

The output looks like:

 

01/01/70   This is a long title                Read More
01/01/70   small title                   Read More

 

However I want the Read More's to be in line with each other..  i cant use a table since this div tag uses autoscroll bars when the content increases...

 

any help is appreciated..

Link to comment
https://forums.phpfreaks.com/topic/122364-css-alignment/
Share on other sites

i wouldnt use spans for this id use divs to move the content will give you more play with wdiths and text alignments

 

<div style="width: 420px; height: 275px; overflow:auto;">  
   <div class="date" style="width:120px;float:left;">01/01/70</div>
   <div class="stuff" style="width:120px;float:right;">Read More</div>
   <div class="title" style="width:170px;">Titles</div>
</div>

 

 

Link to comment
https://forums.phpfreaks.com/topic/122364-css-alignment/#findComment-631833
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.