PSD to HTML 3.7) Styling the Body Text
Transcription of PSD to HTML 3.7) Styling the Body Text
hello and welcome back to the PSD to HTML responsive portfolio built we’vemoved everything into a new folder so all the changes we make in this lesson will be saved in these tight 12 folder and I want to tackle some of the texts year women take care of our HeaderText up here at the top and then this design services section because those are both pretty simple sections that we need to take care of so we’ll start with our header at the top so let’s take a look at that near Photoshop file we always need to compare our work to her Photoshop file to make sure that we’re on the right choice and even though we’ve chosen different fun to use on the website we still want to try to get it to look somewhat similar as far as the font styles go and we can see that this fox I’ll here is much lighter are much thinner than the Fox I’ll here and that’s because by default and h1 tag orange 3 tag is going to be bold so let’s take the bold off of those and see how that works let’s jump back into text me here or whatever text editor you’re using and we have our main navigation section here let scroll down to the bottom a couple lines and create a new comment section called header just so that we can easily find a different sections in our CSS file and I was like to do that and enter header first of all I want to style the h1 and h3 tags so we’re going to point to the header element because remember if we go back to our each team will file and scroll down to our header were using a header element here so we have our opening and closing header tags and then inside that we have her h1 and h3 and her header has been given a class of container which will give it that same width as the rest of our content so now I want to go into the h1 and h3 for the header element and figure out what styles we need to play some of those so go back to style that CSS and so we’re going to point to the header element don’t accidentally put a dot in front of that this is not a class named this is an element so I’m gonna points in the header element in the h1 tag within the header let’s go to the each Freitag within the header element as well so we have this comma-separated list were going to apply the following styles to the each one tags inside the header element and the h3 tags inside the element so what we’re gonna do for both of these is simply set the font wait if you can’t spell it right to normal save that and refresher page and that already like the text quite a bit and I really like the way that looks so then we need to adjust the color so if we go back to our Photoshop file here we can see that the text here as kind of a like red color to it so many hit in Photoshop to switch to the text tool in the just click anywhere inside the text field and we can come up here to the top and we have our hexadecimal value here efore 6965 so I’m gonna copy that and we’re going to use that in a few places so what I’m gonna do just for now is gonna come up to the very top and I’m gonna create a comment here that says read texts and we’re gonna set that read text color were just gonna paste that hex value that we use for that read text color so that easy to find in fact I might just to make the solute clearly meant to say read texts and in this value that way we don’t have to jump back and forth into a Photoshop file every time we want to grab that color again and we don’t have to search up and down all throughout our CSS document to find it we could just find it up here that topped to read text here to do the same thing for the a great color that we’re using for the rest of our texts which is right here 777 so we come down here and we can say great text equals pound 777 and that’ll be a good way to keep track of all the colors are using so let’s grab this color sheer copy it and we’ll go back down to our header section in this red color for headers just going to apply to the h3 tags on screen a new rule here that applies just to the h3 tag within a header and let’s get that color so color space and then we’ll pace that value we just copied jumped back into chrome and refresh and their ego so now when it just this size is a little bit what this text to be a lot larger so let’s jump back into our code and let’s make that happen so for each one time we’ll put it before the each three since it comes before the each three Tek so far h1 tag inside her head I won’t be fun size here to be 44 pixels and then for h3 it’s gonna be quite a bit smaller let’s give it a fun size 20 pixels and let’s see how those local save that jump back into our file and refresh your page and their ego that looks a lot better so now let’s center align text and we should be good to go there so for both of these the h1 and h3 we’re going to align the texts of the center so will set the text have an online property to center save it refresh your page and their ego much the only issue if we go back to our Photoshop file is we have a little bit of spacing in between the text field and our navigation bar so let’s make that happen right here so let’s go into our CSS here and for the each one let’s try adding a margin top property to its a margin hyphen top let’s set it to 10 pixels from now say bad refresher page and manages it down a little bit let’s bring that up to 20 pixels and their ego that looks a lot better so let’s also do 20 pixels bottom padding or bottom margin excuse me on the h3 tag move all the content below it down a little bit so we’ll come down to the beach three rules and said margin hyphen top top bottom 220 pixels say that refresh and we see that in just this content here down a little bit it’s kinda hard to tell them but when we expand that featured content out and pulling her images will see that spacing it should look pretty good so then I want to go ahead and tackle our design services here over at it and our Design Services section is a good representation of what most of the Texas on our website will look like if we have a bunch of text on a website or so in that section if we go to text me jump into our HTML file and scroll down past the feature section here is that article with the class of body text and it’s all contained in this section here so we can do one of two things if this text is going to represent the defaults text from this server website didn’t we don’t need to target this body text class instead we can just target the h2 element and the P element now is there something we wanted to specifically apply to this particular article at this particular section then we would need to target that body text class but for all intents and purposes this text is really going to represent what the Texas supposed to look like on most of our site so let’s just get the rules for the each to tag and the paragraph tanks so we’ll jump into sight that CSS and since we’re doing these this particular rule for the full text for entire site we don’t want to include it in the section like header or navigation and said we’ll include it up here at the very top so maybe just below container or actually a suit just above containers so good to create a rule for h2 element and here we’re going to set our color to that same red color we used before appear so we can just copy that and he said don’t hear what’s also set our fun sides for these for these h2 tags 240 pixels will set our fund wait to normal because the bold for this text is a little bit thicker than I wanted to be and put some top and bottom margin on it because remember up here we collapsed all the margins for all of our heading tags or paragraph tags are list items etc so we need to apply some top and bottom margin here to give it a little bit of spacing above and below those each Tues so it’s set our margin property here to see fifteen pixels space 0 that will set the top and bottom margins 215 pixels and the left and right margins 202 and see how that looks will save that jump back into our Design refresher peach in there we go now are each Tues or nice and bold and looks good so now that we’ve gotten some of the text items out of the way we can move on to the next video where we’ll start putting together our featured section so thank you for watching you know CNN
PSD to HTML 3.7) Styling the Body Text
Reviewed by Tayyab Saqlain Zakki
on
23:51
Rating:
Reviewed by Tayyab Saqlain Zakki
on
23:51
Rating:

No comments: