• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

php help. aligning items left to right.

Josiah

Gawd
Joined
Oct 26, 2000
Messages
734
www.countrydayschoolbr.com is the website I am working on. I am editing a Joomla! template that mostly works for what they want. What I want is for the top three things to be left center and right, instead of stacked on top of each other. The logo on the left, random image in the center, then newsflash on the right. I have tried but I can't seem to make anything work. This is probably due to me having 0 php knowledge. It seems like it should be simple and I know it will fit. This is the code in question:
Code:
</td>
<td class="wrapper">
<div id="header"></div>
<?php mosLoadModules ( 'user5' ); ?>
<?php if (mosCountModules('user1')) { ?>
	  							<table class="opentable" width="150" id="flashbox">
								<tr valign="top"><td class="topflash">&nbsp;</td></tr>
								<tr valign="top"><td class="midflash"><?php mosLoadModules('user1'); ?></td></tr>
								<tr valign="top"><td class="botflash">&nbsp;</td>
								</tr>
				 				</table>
								<?php } ?>
<div id="contentarea">
The header part is the logo. The user 5 refers to the random image. The user 1 refers to the newsflash box.

Also if anyone can give advice as to how to add a backgrount to the user 1 and user 5 portion so it actually matches the rest of the page that would be helpful as that is my next project. I am assuming that will be taken care of in the css. That is a whole other bag of beans. Oh and if someone knows a good php or css cheat sheet site that says "x code will do this" that would help. I feel like an idiot right now with the amount of time I have spent trying to make this work. Thanks.
 
Boy. That is one jumble of goopidty-goop! Why don't you just start from scratch and build them a site yourself instead of trying to mod that?

I know that is of no help to you, but it really makes me wonder. What is it about that code that you want to keep? If it is just the design that you like, you would probably be better off learning how to design that from scratch rather than putting all that time in trying to make it work for your needs.

Maybe I'm not advanced enough to understand what they were trying to do with that code, but it looks fubar to me. I would be ashamed to have written that.

It sounds like you are just starting out with the whole web design stuff, and that's cool. I would just hate for you to develop bad habits, and be satisified with something that works "OK" but isn't done right.

Here is a site to start out with. There is all sorts of good info there: http://www.w3schools.com/
 
Try putting them all in a table... like so:

Code:
</td>
<td class="wrapper">
<table border="0" cellpadding="0" cellspacing="0"><tr>
<td>
<div id="header"></div>
</td>
<td>
<?php mosLoadModules ( 'user5' ); ?>
</td>
<td>
<?php if (mosCountModules('user1')) { ?>
	  							<table class="opentable" width="150" id="flashbox">
								<tr valign="top"><td class="topflash">&nbsp;</td></tr>
								<tr valign="top"><td class="midflash"><?php mosLoadModules('user1'); ?></td></tr>
								<tr valign="top"><td class="botflash">&nbsp;</td>
								</tr>
				 				</table>
								<?php } ?>
</td>
</tr></table>
<div id="contentarea">
That might work.
 
Yes!! thats it. It worked. Fixed the background with the css too.

Thanks for the link I'm sure that will be helpful. I am not a web designer (like you couldn't figure that out) so I tried to find something that was close to what they wanted that I would be able to mod the colors and design. I chose Joomla! because they need to be able to add content themselves and I don't expect them to edit a html file. I must say that this has been quite the experience. Reverse engineering the php and css, while not the most effective way of learning or getting this website done, has helped me learn a lot. I just hope they like it this way. I am trying to please 3 different people that have slightly different opinions of how it should look. Thanks again for the help guys.

Oh yeah the reason the code is all fubared is because that is all stuff I added to get those 3 specific components at the top.
 
Back
Top