sam06 Posted July 12, 2008 Share Posted July 12, 2008 If you look at http://www.tizag.com/beginnerT/ Whenever they want to show some code, they have it inside that box that floats inside the cell. How do you do this? I assume it's inside a table, but I have no idea how this is done. Quote Link to comment Share on other sites More sharing options...
unsider Posted July 12, 2008 Share Posted July 12, 2008 I'm assuming you're talking about the little table that is labeled "HTML Code", and has a blue border, etc... That techniques is done by <div> tags, here is the exact code from the site... <div class='codewrap'><h2 class='specialT'>HTML Code:</h2><pre class='code'> <html> <head> </head> <body> <h2>My first webpage!</h2> </body> </html> </pre></div> Then you would need find the class in their included CSS files in order to determine the specifics. (ie... If you wanted to include it all on the same page you would... <script type="text/css"> .codewrap { border: 1px; } </script> Otherwise, make it an included file. I hope this helped. I'd suggest reading up on <div>, search google for some tutorials, it will all make sense real quickly if this didn't. Quote Link to comment Share on other sites More sharing options...
HomerTheDragoon Posted July 12, 2008 Share Posted July 12, 2008 I think he also wants to know how to show the code as you would see it in ur text editor. They most likely use a function(im pretty sure there site is made in php) that converts html characters to their html entities. Basicly converting < > to "text codes" have a look here for all the symbols(or most of em). http://www.w3schools.com/tags/ref_entities.asp Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.