Viper5646 Posted May 10, 2010 Share Posted May 10, 2010 Hi I Just finished the CSS tutorial and created a Navigation bar where one of the menus opens an Image.This Image replaces the navigation bar and is placed at the top left .How can I place the image in the center and still leave the navigation bar displayed.Here is my HTML and CSS code.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><link rel="stylesheet" type="text/css"href="NavigationBar.new.css" /></head><body><ul ><li ><a href="images\Nathan.jpg">Home</a></li><li ><a href="images\linda-e-exuberante.jpg">Images</a></li><li><a href="Videos">Videos</a></li></ul></div></body></html> ul{list-style:none; margin:0; padding:50px padding-bottom:5px;}a:link,a:visited{font-weight:bold;color:black;background-color:red;text-align:left;padding:22px;text-decoration:nonetext-transform:uppercase;}li{float:left;display:inline;}a:hover,a:active{background-color:#C00000;color:white;} a{display:block;width:50px;} Thank you Link to comment Share on other sites More sharing options...
1089 Posted May 10, 2010 Share Posted May 10, 2010 (edited) I had this same problem. text-align: center; Seems to be the only way to center images. Edited May 10, 2010 by 1089 Link to comment Share on other sites More sharing options...
Synook Posted May 10, 2010 Share Posted May 10, 2010 Umm, you have to create a new page that includes both the menu bar and the image. Note that you are supposed to use forward slashes for your paths.1089: images are inline elements, so you center them like normal text. Link to comment Share on other sites More sharing options...
Viper5646 Posted May 11, 2010 Author Share Posted May 11, 2010 Thanks 1089 and synook for your help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now