Apokalupsis
Members
-
Joined
-
Last visited
Reputation Activity
-
Apokalupsis got a reaction from Nillervision in layout of a headerMan, I always forget to do that. I really need to brush up on floats.
Anyway, I also forgot to include the jsfiddle link (and I can no longer edit my first post). Here it is for convenience: http://jsfiddle.net/Apokalupsis/YJURX/5/
As to thw "wrapper issue"....
1) I think it's fine to use the html5 elements as long as it is understood that not all browsers still support it. So you have to ask who will be using this site? And when you do use html5 elements that are not widely supported cross-browser, then using the -moz- or -webkit- prefix where applicable is important IMO. That, or maybe using something like modernize.
2) I don't use the "body" tag as a wrapper, I like to keep it separate from containers or wrappers, using naming it something more applicable. I suppose this is an issue of preference (as well as habit maybe?)...but I'm just more comfortable that way, allows for a bit more freedom perhaps.
-
Apokalupsis reacted to Nillervision in Help creating a in-page pop out window.@Wickham: OP clearly says that he doesn't want a seperate page so I did not mention the window.open method as you sugested in your first link. You are right that in both my examples the loaded content is on the main page from the start but thats very eay to change by giving it an absolute position and change style display propperties with a click event (in my 2. example we allready have created that event). Also I disagree that using jQuery for Ajax requests should be avoided. The jQuery library is included in so many websites that chances are that the library is allready fully loaded and present in the users cache when she/he visits your site. Just remember allways to load it from a CDN either from googleapis.com or jquery.com. Ajax requests themselves isn't more resource consuming than a php form submision with post or get methods.
However by using Ajax request without jQuery will improve the performance to some degree. So if any one is interested a raw javascript method I recomend waching a these videotutorials i did a while back
Part 1
Part2
-
Apokalupsis got a reaction from A in Help creating a in-page pop out window.Cool, thanks Nillervision.
Question though...isn't using iframes today outdated? I always thought it was not a "best practice." Is it commonly used today?
-
Apokalupsis reacted to Nillervision in Help creating a in-page pop out window.Hi. There's really no need to use external plugins for what you are trying to do.
Basicly there is two methods: You could use iframes or AJAX
The very easy method (iframe)
<html> </head> <body> <!--Your tabs for navigating through the content--> <a href="externalcontent1.html" target="iframe_a">Content1</a> <a href="externalcontent2.html" target="iframe_a">Content2</a> <a href="externalcontent3.html" target="iframe_a">Content3</a> <br/> <!--The box for your external content--> <iframe src="external-html1.html" name="iframe_a"></iframe> </body> </html> You simply use the target attribute of your links to have them displayed in the iframe
The not so easy (but still easy) method (AJAX)
Using jQuery's .load method Ajax requests has never been easier
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <!--Your tabs for navigating through the content--> <a class="tabs" href="externalcontent1.html">Comtent1</a> <a class="tabs" href="externalcontent2.html">Comtent2</a> <a class="tabs" href="externalcontent3.html">Comtent3</a> <div id="loaderBox" style="width:500px; height:500px;"></div> <!--JavaScript--> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script> var theUrl= ''; $('.tabs').click(function (e) { theUrl= $(this).attr('href'); $('#loaderBox').load(theUrl); e.preventDefault(); }); </script> </body> </html> Note that Ajax request will only run on a server so you can't test this on your local machine. We simply attach a click event to every link with the classname "tabs" the function loads content into a div with the id "loaderBox". Using the "this" keyword we can store the href attribute from the link in question for every click event. preventDefault makes sure that that the browser don't navigate to the link. If the user has disabled js the links will be followed as normal (same goes for search engines)
-
Apokalupsis got a reaction from robertahilljr in Help creating a in-page pop out window.Cool. When you get it worked out, link it. I'd like to see it in action.
-
Apokalupsis got a reaction from robertahilljr in Help creating a in-page pop out window.I'm not a Jquery expert...but I would imagine that is what you are looking for.
Check this Top 10 list out: http://jquerybyexample.blogspot.com/2013/01/jquery-popup-window-tutorial-plugins.html
Particularly #6....I think that may be closest to what you are describing...but there are some great options and customization abilities in all of them.
-
you will need to make another class so it would look like this
<div id="footer"> <div class="bottom-align">Your text here</div> </div>
then for your css
#footer { width: 100%; height: 30px; text-align: right; background-image: url(images/footerbackground.fw.png); position: relative; } #footer .bottom-allign { position:absolute; bottom:0; } -
But it isn't aligning the text to the right anymore.
--------------------------------------------------------------
To achive this you can add
right:0; to #footer .bottom-align
-
Apokalupsis got a reaction from Nillervision in Easy Issue (css)You should learn a little about using "divs" IMO. They are going to allow you to style and format your page the way you want. Trying to do everything in the "body" isn't going to work out well. There's plenty of info on using divs and all their attributes on the net. An obvious source would be: http://www.w3schools.com/tags/tag_div.asp
Also look up "class" and "id".
Lastly, if you are going to use 1 page and have your style be in your html page, then it should be in your header, not body. You can also link your .css in your html. This is stuff you'd find on the w3schools site.
As far as adding "funky" text, the text needs to be "web safe." http://www.w3schools.com/cssref/css_websafe_fonts.asp.
You can of course, use a custom font (@font-face) and host it on your server so that others will see it, or use Google fonts, but that's another issue IMO). There's a lot covered in this thread already.
Take a look at this as a quick example: http://jsfiddle.net/Apokalupsis/LejnB/ (includes code + what it looks like in browser).
Another good source for this type of stuff is www.udemy.com (my go to place for "how to's"). There are some freebies, but a lot are university level course type classes offered by actual trainers and professors. I'm sure you can find the same stuff online for free, but I prefer having it all in one place, plus I know several of the instructors, so I'm a little biased. =P