Sticky header and footer while vertical-aligning content to center - html

I'm trying to achieve the solutions for sticky header and footer from here, and centering content vertically from here.
However I'm unable to get the content centered.
Here's my experiment.
Should I use a simple table instead?

You can achieve it using "calc" and "Flexbox" instead of using table. But it may require some css skill since flex-box is quite new.
Check out this link - http://liveweave.com/5a83eG
Since I'm new in stackoverflow, I can't post more than 2 links. I guess you may google more details about "calc" and "flexbox".

Related

Flush responsive footer to bottom Bootstrap

Well I know there are a million questions regarding this topic - but I haven't found an answer for my specific case.
I am wanting to create a sticky footer (not position: fixed) but one that will stay at the bottom if the content isn't sufficient to fill the page space. If there is enough content the footer will act as normal.
Well on other pages not using bootstrap I have been able to do this:
http://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/
See it working on my site here:
http://www.magnetize.ca/policies.shtml#/pp
But on part of my site I am forced to use bootstrap and when I try the flexbox method things go really wrong:
http://my.magnetize.ca/knowledgebase.php
On most browsers I only see the footer get cut off on that page - but on Safari things get seriously messed up.
So, to summarize, I am looking for:
A sticky footer solution that:
Isn't the fixed footer solution (acts as a normal footer if content is sufficient to fill page)
Doesn't require a fixed footer height
Works with bootstrap
Any help you could give me with this specific problem?
EDIT:
I am just trying out the "table trick" method as listed:
http://galengidman.com/2014/03/25/responsive-flexible-height-sticky-footers-in-css/
It is live now at: http://my.magnetize.ca/knowledgebase.php (on all my.magnetize.ca pages)
It is working much better than flex-box so I have ditched that idea. Everything is working beautifully on all browsers...except safari. On safari there are massive margins at the top and bottom of the page even though no margins are set.
You could try using http://stickyjs.com/ I have used it for navigation bars that start in the middle of the page and then stick to the top.
I also found this http://www.cssreset.com/demos/layouts/how-to-keep-footer-at-bottom-of-page-with-css/# which looks more like what you are looking for.

Basic layout with zurb foundation

I’m trying to create layout using zurb foundation.
Currently, I’ve got very basic one, but one feature blocks me on that very beginning.
I’d like to make my <main> section to take at least 100% - header height - footer height, so <footer> would be on the bottom of the screen (or, if there is too much content, then you’d have to scroll down to see footer)
I created (as I said before, very basic version) here: http://jsfiddle.net/42VcD/2/
I’m not sure if it’s possible without JS, but I’d much more prefer CSS based solution.
Here is a sample for what you are looking, however its not done in foundation.
http://codepen.io/tusharbandal/full/lmrgD
Its done using position: absolute to footer.
Importantly you done need js for that.
Even if content increases the footer move down.
you can specify the height for the main section to your requirement.
here is a fiddle with a class(main) for section 100%.link
.main{
height:100%;
}

create a simple html sidebar

All I look for is a simple sidebar for a simple website. Google results have everything about sidebar except for creating a simple side bar with minimal codes. They are so confusing, Still I have no idea about how to create a side bar. Should I use aside tag or using div? There is no clear explanation. One might help me telling what way they usually use.
My default CSS is twitter bootstrap
Since you're already using Bootstrap, you could just use the container-fluid class, which should generate two columns for you - the leftmost one a sidebar. Just add some additional CSS to add a border on that column and you'll have your sidebar in at most 4 lines of CSS code.
See "Fluid Layout" here: http://twitter.github.io/bootstrap/2.3.2/scaffolding.html#layouts
you could check this link for more info http://css-tricks.com/video-screencasts/115-dont-overthink-it-grids/
depending of what the content is on your sidebar you could use if the content within the sidebar is related to the content in general the aside is a good option. If it is not the you could just add a new div and style it. Another option is to use if the aside doesn't quite fit the bill.

What is a page-wrap div and what is it used for?

I'm seeing div class="page-wrap" used extensively in web applications.
What is the convention for the page-wrap class, what goes inside?
It all depends on your css layout you are applying... Sometimes, people use wrap containers to use sticky footer technique (header and content in the wrap, footer after the wrap - google it); sometimes with this wrapper the designer just wants to fix the entire page to certain width and center it (not saying that this is the best way or that there is a best way), etc... It is really subjective, because it is mostly a design thing.
By convention it can take ONLY the following:
*
Yes, everything. I am sure there's no such convention about it. The possible reason to use this div tag with page-wrap class may be to clarify that before it is the header region and after it come sthe footer part. So if I have a simple 5-page website, I'll have a common header and common footer, shared by each of 5 pages. My about-us page will be different from my contact-us page only inside <div class="page-wrap">.

How To Align Body Content so it Aligns w/Header & Footer

I am building a website but I started with a template and gutted it, changed a lot and got rid of the entire center section and now I have to start over with the body but whenever I try to insert the navigation menu, which is a javascript code that is inserted from another program I used to build it. Well, every time I try to insert the menu on the left side of the page, it falls outside the alignment of the header and footer, so instead of it being straight aligned with the header and footer on the left side, it is on the outside of where it should be. I'm absolutely retarded when it comes to this stuff so if someone could tell me the trick here and for building the content of the body. Just simple stuff like what html code and tags to use for making the boxes that you can insert things into, not image placeholders but boxes to input content like navigation menu or anything really?
HELP PLEASE.
here is the site.
Retairacket.thexdt.com
I also get an invalid URL error.
By the sounds of your problem though, you should be able to fix it relatively quickly and easily. I assume from the sounds of it that your header and footer are a fixed width and that there is likely a fixed width block within the body that is forcing the body to be wider when you add in the (most likely) fixed width nav as well. If that's the case, then you will just need to change the way you are controlling the widths to suit the new nav bar. So reduce the width of one block to accomodate the width of the new one, make sense?
Remember, I haven't actually seen what the problem is, so I'm just guessing from your question here based on the most likely sceanario.
I would also recommend learning the basics first. Designing a website isn't as everyone makes it out to be. As an extreme beginner without using WYSIWYG editors, coding HTML can be very complex. There aren't just "tags to use for making the boxes that you can insert things into."
Yes, there are <p> and <div> tags that will do what you want, but you need to understand what each tag does and when to use it.
I recommend the following sites:
w3schools
HTML Goodies
Webmonkey
Search Google for "HTML basics"
That URL isn't valid, apparently.
I also can't see your page, but I can see http://www.thexdt.com. Is the design similar to that page?
That page uses tables for the general structure. Is there is a large image or something bigger that the width of the external container?