Jump to content

Need Help Getting 2 Text To Display Items To Far Left And Far Right


ready2drum

Recommended Posts

Is there a way of displaying 2 items of text, one to the far left and one to far right of the page without resorting to the cheesy method of using a million non-blank spaces to separate the two items of text? Below is the code currently being used for this simple, yet complicated, approach....(try not to laugh too hard..lol)

<table width="100%" border="0" cellpadding="2">    <tr>      <td colspan="2" nowrap="nowrap" bgcolor="#ddecc3" class="fstyle_3"><div id="list_item2"><?php echo $title ?>                                                                                                                         <a href="BasicTutorial.htm" target="_blank" class="style6">>Search Tutorial<</a></div></td>	  </tr>    <tr>      <td class="fstyle_1">    <a href="search.php" class="style1">Main</a> <?php echo($string); ?></td>    </tr>  </table>

If you have a better and more efficient use of programming techniques to solve this dilemma, I'd greatly appreciate your help.Thanks!

Link to comment
Share on other sites

This isn't a PHP question, this has to do with HTML and CSS. One method is to use the CSS float property, you can float elements to the left or right. Another method is to use a table with 2 cells, the first cell can have a width of auto and text align on the left, and the last cell can have a width of 100% and text align on the right. All of these are CSS properties.

Link to comment
Share on other sites

This isn't a PHP question, this has to do with HTML and CSS. One method is to use the CSS float property, you can float elements to the left or right. Another method is to use a table with 2 cells, the first cell can have a width of auto and text align on the left, and the last cell can have a width of 100% and text align on the right. All of these are CSS properties.
Your suggestion to use CSS float property worked great! thanks! I actually used PHP code to fix the page the way I want it to work, but now, using PHP, I can't seem to edit the height and width of the PHP hyperlink which is set to 'target="_blank"....see code below for details....
<td align="left" bgcolor="#ddecc3" class="fstyle_3"><div id="safety_search"><?php echo $title ?></div>		<div id="search_tutorial"><a href="http://website.com/safety_search/BasicTutorial.htm" target= "_blank"><?php echo $tutorial ?></a></div></td>

I've tried several options without much success and a whole lot of error messages...so now I'm seeking guidance from the forum again.Thanks!

Link to comment
Share on other sites

Have you tried using a style attribute on the <a> element to specify the width and height? You shouldn't be getting any error messages with this, invalid CSS just gets ignored, the browser won't pop up an error for CSS normally.

Link to comment
Share on other sites

Have you tried using a style attribute on the <a> element to specify the width and height? You shouldn't be getting any error messages with this, invalid CSS just gets ignored, the browser won't pop up an error for CSS normally.
I tried using the 'rev' attribute, but I must have used it incorrectly because it made the window to the correct width and height (930 x 750), but it was blank except for the little square with the red 'x' in the box...funny thing is that when I clicked on the blank window, the link appeared and worked just fine...I've not had to code using PHP to get a hyperlink to display in a certain dimensional format...I've tried alll kinds of things from using 'img src' to adding some code at the top of the page, but it keeps building the window on top of the page that users need to see. I've looked for the past 2 hrs on the internet to find a solution (code format basically), but without any relevant (understandable) examples of how to do this the right way.
Link to comment
Share on other sites

The rev attribute doesn't have anything to do with position or size, it's used to say what the semantic relationship between the two pages is. I'm not sure what you're trying to do, so far we've talking about position and size but it sounds like you're describing a different problem now. If you have a link with a target of _blank it's going to open it in a new window, and that new window is going to be on top of the previous window.

Link to comment
Share on other sites

I understand.....I found out about the 'rev' after I had posted my previous reply...to clear things up...I set up a hyperlink that opens up a 'new window'. What I'm attempting to do is set the height and width of the 'new window' after the user clicks on the hyperlink. I found a reference to 'onclick'. I think that's a possiblity. Your thoughts?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...