Jump to content

Text Overlapping an Image Problem


dthmystc

Recommended Posts

I'm trying to have my links for my navigation be on top of the image I have for the navigation. I want it to look like this:navi.pngBut its coming out like this:navi2.pngHere is what I have used for coding:

div, h1, h2, h3, h4, p, img, span, ul, li {						margin:0;						padding:0;					  }/* Clears any preset mergins or padding */body { background-color: rgb(0,0,51);      }/* Setting the background color to dark Blue */#banner { margin-left:auto;	  margin-right:auto;	  width:50%;	}/* Sets the banner position */#navigation { position:absolute;	      margin-left:25%;	      margin-right:auto;	      width:50%;	}/* Sets the navigation position */.link {	padding-right:9%;	padding-left:4%;		      }/* Sets the spacing between links */

I've tried using padding-top and padding-bottom in my link class to adjust where the links are on the page to have them be on top of the image but they do not budge. I have also tried using margins. Does anyone know how I can fix this?

Link to comment
Share on other sites

#navigation { position:absolute;	      margin-left:25%;	      margin-right:auto;	      width:50%;	}/* Sets the navigation position */

I've tried using padding-top and padding-bottom in my link class to adjust where the links are on the page to have them be on top of the image but they do not budge. I have also tried using margins. Does anyone know how I can fix this?

Padding will not work. Without the code, there may be something else in your way so no guarantees. In your #navigation, add
   margin-top:	-50px;

If this starts things moving, you just need to figure the rest of the math. Bear in mind that placement of your menu text will depend on the font size and the client's adjustment of font-sizes. So check in various browsers and change font size in the Browser....Guy

Link to comment
Share on other sites

I took parts of this lesson to fix my CSS. Unfortunately I do not have a host website at this time so I could not post a sample site. I did however figure out that I had to use margin as a whole instead of just trying to modify left, right, top or bottom. Thank you for the help everyone.
Link to comment
Share on other sites

Hiwhats about using the images as a background of your navigation?

#navigation { position:absolute;margin-left:25%;margin-right:auto;width:50%;background:url(path/to/image.jpg) no-repeat center;}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...