Okay so today, I added in the one line of <meta> that I talked about in one of my previous posts to the Hilt website. It definitely did the job as far as resizing goes, but it looks TERRIBLE:
Matt told me about nav-collapse, which I will look into. I think it'll be helpful. What it will do is this: when the site is being viewed on a screen above x number of pixels, it will look as it normally does. However, when it is viewed on a screen below z number of pixels, it will look different - as in, there will be another set of css for mobile viewers. I think this will help a lot, because there's just too much stuff on the regular site - albeit, it's good stuff.
I'll blog again tomorrow about what I find out!
Imani Jai's ICT Journal
Thursday, June 6, 2013
Tuesday, May 28, 2013
Mobile Checker
I found a site that will check to see if your webpage is mobile-friendly (mobile-compatible) and, if it isn't, tell you what you need to fix so that it is.
http://validator.w3.org/mobile/
It's really cool, and I think it's helped me begin to fix my site! :)
http://validator.w3.org/mobile/
It's really cool, and I think it's helped me begin to fix my site! :)
Friday, May 24, 2013
Twitter Bootstrap
I think I've figured out Twitter Bootstrap. It's kind of complicated, though, and I don't 100% understand everything I've done with it. I think I've found a better tutorial at http://www.revillwebdesign.com/twitter-bootstrap-tutorial/
I'll run you through what I've done so far, though. First thing is you have to download bootstrap and extract the files. Once you've done that, you move the extracted files into whatever folder you'll be working out of. For example, I made a directory in my public_html called bootstrap and placed the extracted files in there. After that, you don't have to touch them.
I made an index.html that I was working with. In that index.html file, I copied and pasted the HTML and CSS code from my blog (the awesome one with the lion on it) so I could work with that. This is what the beginning of my HTML looked like:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
I'll run you through what I've done so far, though. First thing is you have to download bootstrap and extract the files. Once you've done that, you move the extracted files into whatever folder you'll be working out of. For example, I made a directory in my public_html called bootstrap and placed the extracted files in there. After that, you don't have to touch them.
I made an index.html that I was working with. In that index.html file, I copied and pasted the HTML and CSS code from my blog (the awesome one with the lion on it) so I could work with that. This is what the beginning of my HTML looked like:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
If you didn't notice, what I added in there is the <meta name="viewport" content="width=device-width, initial-scale=1.0"> . That does something to the width so that the width of the page changes depending on the size of the device viewing it. Make sense?
<style>
@import url(style.css);
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
</style>
What I added in there was the <link href="assets/css/bootstrap-responsive.css" rel="stylesheet"> which also helps with the resizing of the web page based on the width/height of the device it is being viewed on.
That's all I did! This is what the webpage looked like on my iPhone BEFORE the responsive CSS:
This is what is looks like NOW:
As you can see, it looks weird. HOWEVER, do you see the difference in the size of the text? That's soooo much progress. My personal CSS is somehow conflicting with the CSS that bootstrap provided me, so I have to go in and see what I can do. Maybe this new tutorial can help??
Tuesday, May 7, 2013
I DID IT!
I FINALLY figured out how to get my header to look normal! I googled CSS positioning and also looked through the online book I'm studying, and it helped me out!
Here's what my CSS looked like at first:
header {
position: fixed;
margin-right: 2%;
}
I thought the fact that I had display: table; was messing it up, but what I found out was SO simple, it hurts. Here's my new CSS:
header {
position: fixed;
right: 2%;
}
THAT'S IT. All I had to do was take out the margin! Now, this is what it looks like:
Here's what my CSS looked like at first:
header {
position: fixed;
margin-right: 2%;
}
I thought the fact that I had display: table; was messing it up, but what I found out was SO simple, it hurts. Here's my new CSS:
header {
position: fixed;
right: 2%;
}
THAT'S IT. All I had to do was take out the margin! Now, this is what it looks like:
Friday, May 3, 2013
Good week
I figured out how to get my header to stay where it is:
header {
position: fixed;
}
The only problem is, when I fix the position, it moves the header over so that not all of it is visible. I'll show you:
BEFORE
AFTER
See what I mean? It's annoying and I haven't yet figured out how to fix it. I think it has something to do with the fact that I have
header {
display: table;
}
in my CSS. Maybe not, but that's all I can think of. Everything is valid, so it's not some discrepancy that is messing everything up. Any ideas?
header {
position: fixed;
}
The only problem is, when I fix the position, it moves the header over so that not all of it is visible. I'll show you:
BEFORE
AFTER
See what I mean? It's annoying and I haven't yet figured out how to fix it. I think it has something to do with the fact that I have
header {
display: table;
}
in my CSS. Maybe not, but that's all I can think of. Everything is valid, so it's not some discrepancy that is messing everything up. Any ideas?
Monday, April 22, 2013
This Week
Since my website looks the way it is supposed to, what I'm working on now is trying to get it to be mobile-compatible. Mr. Elkner is letting me borrow his book, titled "Responsive Web Design with HTML5 and CSS3"
When I start getting somewhere and begin to learn the information I'm looking for, I'll check back in :)
Friday, April 19, 2013
SUCCESS!
So I figured out how to fix my blog! The problem was so simple..... Mr. Elkner suggested that I validate it to see what was wrong, and the only problem was that I accidentally closed an <li> with a </ul> instead of with a </li>. So I fixed that, and the lion is back in proportion.
I added background-attachment: fixed so that the lion doesn't scroll with the text on the screen, and it looks really nice. The thing that I struggled with was getting rid of all of the unnecessary tags that I was using and replacing them with fewer, less complicated tags. For example, I had the title of my blog and the icon inside <section> tags, when it really should have been inside a <header> tag. I also had <br><br><br><br><br> under what is now my header to put a space between the title and the beginning of my posts. Instead of using a whole bunch of breaker tags, I replaced that with margin-bottom: 5% in my CSS.
The biggest problem I had was getting the title and icon to stay in the upper right hand corner. I ended up putting them in a <div> to separate it from everything else, and added float: right to my CSS. This is what I did to my CSS:
header {
display: table;
width: 100%;
text-align: right;
margin-bottom: 5%;
}
header div {
display: inline-block;
text-align: right;
float: right;
}
header img {
display: inline-block;
float: left;
height: 100px;
width: 100px;
padding: 2%;
}
header h1 {
display: inline-block;
font-family: 'Covered By Your Grace', cursive;
font-size: xx-large;
float: left;
}
Everything looks perfect now. As you can see, I changed a lot of the pixels to percentages so that the page will look good on any size screen. I'll post the link below, as well as a screenshot of the page, so you can see yourself.
I've begun to look at the book 'Responsive Web Design with HTML5 and CSS3'. I'm hoping that that will help me make my site mobile compatible :)
This is what it looks like now. Isn't that sooo much better? I was even able to add my Korean nuke picture in without it messing up the alignment!
I scrolled down so you can see how the lion doesn't move, even when the text does.
I added background-attachment: fixed so that the lion doesn't scroll with the text on the screen, and it looks really nice. The thing that I struggled with was getting rid of all of the unnecessary tags that I was using and replacing them with fewer, less complicated tags. For example, I had the title of my blog and the icon inside <section> tags, when it really should have been inside a <header> tag. I also had <br><br><br><br><br> under what is now my header to put a space between the title and the beginning of my posts. Instead of using a whole bunch of breaker tags, I replaced that with margin-bottom: 5% in my CSS.
The biggest problem I had was getting the title and icon to stay in the upper right hand corner. I ended up putting them in a <div> to separate it from everything else, and added float: right to my CSS. This is what I did to my CSS:
header {
display: table;
width: 100%;
text-align: right;
margin-bottom: 5%;
}
header div {
display: inline-block;
text-align: right;
float: right;
}
header img {
display: inline-block;
float: left;
height: 100px;
width: 100px;
padding: 2%;
}
header h1 {
display: inline-block;
font-family: 'Covered By Your Grace', cursive;
font-size: xx-large;
float: left;
}
Everything looks perfect now. As you can see, I changed a lot of the pixels to percentages so that the page will look good on any size screen. I'll post the link below, as well as a screenshot of the page, so you can see yourself.
I've begun to look at the book 'Responsive Web Design with HTML5 and CSS3'. I'm hoping that that will help me make my site mobile compatible :)
This is what it looks like now. Isn't that sooo much better? I was even able to add my Korean nuke picture in without it messing up the alignment!
Ignore my computer background, haha! I made the screen smaller so you can see how it adjusts.
I scrolled down so you can see how the lion doesn't move, even when the text does.
Go look for yourself! LOOK AT MY COOL LION WEBSITE THAT HAS NOTHING TO DO WITH LIONS!
Hope you like it :)
Subscribe to:
Posts (Atom)