Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text under row of images 3

Status
Not open for further replies.

DaSe

Programmer
Feb 14, 2008
149
GB
Hello guys...Wonder if you could help me with this issue..
So to be concise - I have a 'div' container into which I query a series of video links. The embedded videos are aligned next to each other in the container in rows. There are 3 videos in each row. Now I would like to add text corresponding to each video under the video clips. I've been trying with different positions including floating - but as soon as I add the queried text underneath the layout of rows gets messed up. I'd appreciate any comments.

The code of the container itself is below - and that would be ok if this doesn't have to be changed.:
Code:
.tab_content {
	padding: 20px;
	font-size: 0.9em;
	color:#FFFFFF;
	font-family:Arial, Helvetica, sans-serif;
	overflow-y: scroll;
	overflow-y:auto;
	overflow-x:auto;
	height:500px;
	min-width:400px;
	
	
	
	
}

Thanks..

 
DaSe said:
The source shows / decodes PHP variables - hence there are so much of it. I mean shows PHP variables implemented into HTML as well.
...
Hey - no - it's the source code that shows the multiple body / html tags. All the page is neat and the extra javascript and php codes are placed in different folders. But the source shows / packs everything into one source code.
I think you do not understand the way php includes work. Source code shows exactly what your page looks like to the browsers and consequently your users. That means you have three opening html tags and so on and it is nothing short of a miracle that the page displays correctly in at least one browser. From your last (php) code, I can see that you are including two files that have a name that would suggest they are full html pages, including html, head and all corresponding tags. This would explain the mess that is your source code.

Please see this simple tutorial on how to properly use includes:
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
This is true actually - I see now...yes, there are 2 html pages included into the main index.php page within the html tags. I need to strip unecessary html tags from them. Still, this is another issue ( that I'm grateful for making me realise that ) than floating the text under the video clips. You see all the code now. It took me few mintues to layout it correctly within a table whereas I've been strugling with css positioning in this case for much longer with no results - as I said - I rely on css, it's great but always find ( at least for now ) problematic to layout texts and images from PHP code within html...Cheers.

 
Please understand that your PHP script creates standard HTML code and it is the page it creates which is important.
Your pages would be far simpler if you used external style sheets rather than putting the style information into the header section of each page.



Keith
 
Like Keith said, the fact that you're using php to create your html changes nothing. I usually create static html pages first, and then wrap them within a dynamic script that creates those static pages that I have developed earlier.

Your problem is that you have three whole pages in one page. With a code that wrong, it is surprise browsers have any idea what to do with it. Imagine if I drove to your house with a minivan that had a sedan inside, inside of which was an SUV. How would you react? Where would you sit? Which car would you operate? Similarly confused is the browser when it reaches your page. That is why you should first fix the page so that it is valid and then try to figure out why your text is not displaying where you want it to. If that will still be an issue with a valid page.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Hey guys...a bit of feedback of course. Thanks for suggestions but sometimes I get impression whether you're a bit confused as well. First of all - in your 2 posts above - you mention that I placed css / style code without putting it into external folders ( or referring to them ) - can't you see there 2 links in HEAD section linking to 2 external css ? I placed only a tiny bit of css code underneath HEAD section. Then I placed CSS from external folders for you to see..come on guys. Second of all - I realise and liked the methaphor aout Sedan etc. still - it is absolutely RIGHT to include many pages within HTML ( like PHP include example ) and when the divs are right and closed - there is nothing wrong with placing pages dynamically into each other. On my main page there's a jQuery code ( again in an external folder in case you don't see it ) that makes tabs. Into these tabs I implement PHP codes. Again, this counts but how many modern sites ( dynamic ) can be complied to w3c ? Not many if you want to use jQuery , Flash and more interaction. My code is not perfect ( far from it ) but still not bad and quote neat - just look at the HEAD tags guys. Third, again - this got nothing to do with my question of how to put text under the clips by css methods - I think you just bypass a bit / diverse - but still, advise at least something else. 'Fourthly' - guys - I like this forum...but I remember the other asking about a small advice of PHP code in here and I have this slight feeling that you sometimes love to diverse too much from the original question... ;] or maybe I am all wrong, this time ? Regards, of course...

 
it is absolutely RIGHT to include many pages within HTML ( like PHP include example ) and when the divs are right and closed - there is nothing wrong with placing pages dynamically into each other
Wrong!
A HTML document should only have 1 head section, 1 body section and 1 footer section.

I have this slight feeling that you sometimes love to diverse too much from the original question
All advice given has been relevant to your problem.

You have layout issues which cannot be sorted out until your HTML resembles that of a correctly formed web page.

Keith
 
Ok...thanks, I try to correct it first then..

 
DaSe said:
it is absolutely RIGHT to include many pages within HTML ( like PHP include example ) and when the divs are right and closed - there is nothing wrong with placing pages dynamically into each other.
It is absolutely right to include many page [blue]segments[/blue] within an HTML document, [blue]as long as the segments form a valid page, when they're all joined dynamically.[/blue] Similar to how it was done on the link I provided. Or, if you want to stick with the metaphor: it's perfectly OK to put different seats, pedals, steering wheel, etc. in your car, as long as that car is assembled correctly (having just one steering wheel, having seats and pedals in correct places, etc.).

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top