PSD to HTML 3.1) Creating a Style sheet
Previous: PSD to HTML 2.5) Structuring the Footer
Transcription of PSD to HTML 3.1) Creating a Style sheet
hello and welcome back to the PSD to HTML responsive portfolio build now that we finished up our HTML as you can see we’ve got a lot of work to do to make this site look good we’ve got our content out of the way but now we need to work on the design so again we’re going to refer a lot to our Photoshop file as we start building the south will you need this to determine what thoughts were going to use for certain areas what colors were going to use what sizes were going to use what images were going to use and we’re also gonna be cutting up certain parts of this file in order to get the images that we need but in this video I want to start by getting our style sheet up and running so it’s jumping back into text me here and I’ve moved everything into a new folder so all the changes we make in this lesson will be saved in the site and 06 folder but are starting files here are the files that we ended up within the site 05 folder so that’s where we’re starting but again all the changes we make will be saved in sight 06 so we’ve created our index HTML file now we’re going to create our CSS file so if you’re using text me like I and we can just come over here to our side panel right-click on our site folder and a folder this ways we can create a new folder and I’m gonna call this styles and then we can right click on that folder and create a new file and we’ll just call it how I don’t leave it there and call it styles . CSS actually might call it site CSS and Lucy that in these styles folder so in our site that CSS file file we can start creating some some basic CSS resets we can create a recent for the HTML element body UL’s allies of our H tags each one through age six as well as image tags and paragraph text just to get rid of some of the defaulting borders and padding so that we can customise that how we want to so consider margins for all of those 20 and her padding 20 also appear above the margins and paintings and I’m an asset or font color and we use kind of a medium dark gray color for our fund of pound 777 and if we go to our Photoshop file and let’s take this header text for example we can zoom in on that and then tab to get our toolbar is back and we’re gonna come over to this toolbar on the left and grabbed the color picker there and then just however our color picker or eye dropper tool over some of that text and there we see that value of 777 777 if we go back to our CSS we can write that in shorthand just using 37 so that’s our text color there and what’s goin center font family as well and we’re using aerial for Army in paragraph on Soyuz aerial and then we’ll put a couple of backup funds in here Helvetica and sans serif I also wanna set the default font size but we don’t want to set that default size for all of these if for example we want to set our fun size 240 pixels and we do it here then all of our age once in each twos and threes etcetera will all be fourteen pixels and that’s not what we want we want those to be large so we’re just gonna skip down skip a couple lines and for the body we’re going to set our fun size 240 pixels that way some of these items inside the body will still have some relatively larger font sizes so do that and let’s take a look at this but before we can get this working in fact if we were to view this now in a browser refresh your page you’ll see that nothing changes at all our texts still black and the reason for that is we haven’t linked up to that style she lets go back to our code and we’re gonna go over to our index HTML file in the head of our document we need to link to that style she tank using a link element so just after that I’ll hit enter to go to the next line I’m gonna cheat a little bit because I can’t in in TextMate if you just grab that site that CSS file here and we need to make sure that we keep index HTML select and we just grabbed site’s css in drag it over here you’ll see that it drops in our link tags for us so we have linked relations stylesheet href equals and then the location of that file type vehicles Texas as media screen etcetera etcetera etcetera and so we just dropped out in there I’m gonna actually get rid of all of this media title and character set and just leave it as is so there’s our link tags for style sheet so now we see that and jump back into chrome refresh your page now we can see a few things have happened first of all the margins and padding have been taken off the page and our texts now right up against the edge of the of the browser window and a text is now that light gray color also our text is now aerial instead of the default serif font that we saw before so we’ve gotten a good start we know that our style she is hooked up and working properly so now as we move forward we can start stealing our site to make it match our Photoshop file so we’ll get started with that in the next video thank you for watching
PSD to HTML 3.1) Creating a Style sheet
Reviewed by Tayyab Saqlain Zakki
on
23:46
Rating:
Reviewed by Tayyab Saqlain Zakki
on
23:46
Rating:

No comments: