PSD to HTML 3.4) Styling the Menu Items
Transcription of PSD to HTML 3.4) Styling the Menu Items
hello and welcome back to the PSD to HTML responsive portfolio build another we’ve gotten our navigation bar set up what’s finished laying up the content inside that navigation bar which includes two unordered lists so we’re going to jump into text me going to change this to say 05 moved everything into the site 09 folder so all the changes we make in this lesson will be saved there so we’ll jump into our code and in a HTML file if you remember we have are never element here in inside that Neville and that we have this development with a class of container that class of container as we mentioned before is the class that’s going to restrict the you wit of our content so it’s going to make a rule for that container class will go to site that CSS and this container classes not specific to the navigation so I’m not going to put it in the main navigation section and said I’m gonna put it up here above the main navigation tool just create a rule four-dot container which is the container class and for the whips I’m going to actually give it a max with instead of just sitting there with to a solid 920 max with so somebody resize the browser down the container will surgery size down with it but it won’t get any wider than we’re going to 7,900 pixels so max hyphen with a value of 900 PSX and that will restrict the width but it will still be left alone if we save this and refresh your page you can see that our texts over here has been cut off 900 pixels from the left edge of the browser but now we need to center all of that content so the way we do that is we simply had a margin property to our container inside the 20 space auto that will set the top and bottom margin 20 and the left and right margin to auto which will basically even itself out so that all of the content inside the container is centered in the browser’s let’s aim that refresh their ego so now when I pull our social icons list over to the right will pull in the images later before 2002 the rights that out of the way and the way I’m gonna do that isn’t going to float it to the right sort of come back to our CSS file and we’re gonna create a new rule for just the social list will skip a couple lines and create a new rule four-dot social heightened list and we’re gonna floated to the right of that and refresh and their ego so now that’s floating to the right but you’ll notice it’s still staying within that 900 pixels of with that we just set up so now what set up our text here go back into our final and the text if we go back into HTML file its inside an anchor tag which is inside a list item which is inside are unordered list with the class of them have list so let’s go back to site CSS we’ve got a rule for new list items inside both are novelist and our socialist but here we need to get a little bit more specific and point to the anchor tags inside the list items for just the name of lists class so . to.net hyphen list space Li space a so again that’s going to point to any anchor tags within the list items of the nav list class so what we’re gonna do is really change the color of that text first of all to white or we can use the hex value of pound FSF and then we want to get rid of the underline that underlined to be there so we’re gonna sit text hyphen decoration to know that and refresh and it’s already looking a lot better no its not get down a little bit by adding some padding let’s go back to our CSS file and for our list class and we don’t have a rule just for the nebulous we have one just for the socialist let’s come down here and put a rule just for the nav list class by itself and lets the padding top property to the value of 10 pixels save that and refresh and that gets our texts about where we wanted centered in that file then we obviously need a little bit more space in between these items because right now the roads running together they’re all this flooding to the left so they’re bunched up right against each other so I’m gonna add right margin to those lists items and we don’t have anything for the list items that are just inside the novelist class yet we have this rule here which is for novelist and socialist but we want to make one for just now lists face Li and for those lists items were gonna set the margin right property 210 pixels and see how that looks save it and refresh and that’s not quite enough what spread it out it’s going to double that speed of 220 pixels save it and refresh and there goes that looks a lot better so we’ve got those links where they need to be and it looks pretty good so in the next video will move on to these social list will get our images pulled out of Photoshop and separated out so that we can use them in our page and then we’ll style them in position them appropriately so thank you for watching and I’ll see you in the next video
PSD to HTML 3.4) Styling the Menu Items
Reviewed by Tayyab Saqlain Zakki
on
23:48
Rating:
Reviewed by Tayyab Saqlain Zakki
on
23:48
Rating:

No comments: