I want to use CSS and HTML to do this can anyone help me. I have a header with a grey background. I want to make the header text towards the left side and put my nav bar on the right side on the grey background. If need me to post my CSS Code tell me. Here is the link to what i am making. I am new to coding so ya. Also if you see the copyright text it is too big, how can i make it smaller? I try using the CSS size code but does not work. http://chattyden.darkbb.com/My-Online-Portfolio-h2.htm
div header: height: 40px; p header: float: left; bring the ul in the header div. And start playing with margins and paddign again Cheers,
Can you please give me a whole code? I don't get what you mind. Here is my CSS tell me where to add? <!-- NAV BAR --> <head> <style type="text/css"> ul,div.header,div.footer {list-style-type:none; margin:0; padding:0; font-size:15px; font-family:Arial;} li {display:inline;} a {text-decoration:none;} a:hover,a:active {color:black;} div.header,div.footer {padding:0.5em; color:white; background-color:gray; clear:left;} p.header {padding:0; margin:0; font-size:30px; font-family:arial;} p.footer {padding:auto; margin:auto; font-family:arial;} </style> </head> <body> <div class="header"><p class="header">Graphics8 - My Online Portfolio</p></div> <br/> <ul> <li><a href="#">Home</a></li> <li><a href="#">Portfolio</a></li> <li><a href="#">FAQ</a></li> <li><a href="#">About</a></li> </ul> </body> <!-- END NAV BAR --> Code (markup):
<head> <style type="text/css"> ul,div.header,div.footer {list-style-type:none; margin:0; padding:0; font-size:15px; font-family:Arial;} .header ul {float:right; } li {display:inline;} a {text-decoration:none;} a:hover,a:active {color:black;} div.header,div.footer {padding:0.5em; color:white; background-color:gray; clear:left; overflow:hidden} p.header {padding:0; margin:0; font-size:30px; font-family:arial; float:left;} p.footer {padding:auto; margin:auto; font-family:arial;} </style> </head> <body> <div class="header"><p class="header">Graphics8 - My Online Portfolio</p><ul> <li><a href="#">Home</a></li> <li><a href="#">Portfolio</a></li> <li><a href="#">FAQ</a></li> <li><a href="#">About</a></li> </ul></div> <br/> </body> Code (markup):
On a side note why have you got body tags around everything? A web-page should take the following structure: <!DOCTYPE html> <html> <head> Document Title, Meta Tags and Links to external scripts go here.. </head> <body> The body of the document goes here.. </body> </html> Code (markup): You should only have one HTML, HEAD and BODY in your document along with a DOCTYPE of your choice which should always be at the very top.. The HTML wraps around both the HEAD and the BODY. Viewing the source code of different websites in your browser can often help understand how things work, also checking your page against this W3 validator can help identify problems with your page with respect to the W3 spec.