Jump to content

Image and text problem


SirChick

Recommended Posts

I have a question i have an image and a bit of text which is meant to be on the image so i have done this in my css and html page but it wont work:

HTML:

<div id='image'>
<img src="menu_gradient.gif" id="Shape1" align="top" alt="" border="0" width="307" height="440">
		<div id="bv_textleft">
			What The Heck?

		</div>


</div>

 

CSS:

 

body {
background-color: #466B98;
}

#wrapper {
margin: 0 auto;
width: 1000px;
}
#banner {
width: 100%;
height:94px;
margin: 0 auto;
}
#image {
margin-left: 0px;
margin-top: 15px;
}
#bv_text {
width: 100%;
height:36px;
text-align: center;
font-family: "Lucida Bright";
font-size: 32px;
text-decoration:underline;
font-weight:bold;
margin: 0 auto;
padding-top: 10px;
color: #FFFFFF;
}
</style>

Link to comment
Share on other sites

<div id="bv_textleft">
			What The Heck?

		</div>

 

You don't have any id in you css named #bv_textleft.

 

And if you did, this is where it would use position:absolute. However, you would have to make it "relative" to the containing wrapper and not the browser window. Sort of like this:

 

#image {
position:relative;
margin-left: 0px;
margin-top: 15px;
}
#bv_textleft {
position:absolute;
font-family: "Lucida Bright";
font-size: 32px;
text-decoration:underline;
font-weight:bold;
top: 10px;
        left:200px;
color: #FFFFFF;
}

 

Adjust the "top" and "left" amount to replicate "centering. Absolute positioned elements do not use margins.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.