Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Web Design Lobby Forum for general web design issues not specific to scripting or graphics.

Sponsored Reviews   World's Leading Outsourcing Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 08-10-2006, 09:00 AM   #1 (permalink)
Inactive
 
Join Date: 08-08-06
Posts: 8
iTrader: 0 / 0%
Latest Blog:
None

Jordonias is liked by many
Image inside Div

Ok, I have an image inside a div. The div is 804px by 100px. The image is 500px by 70px. I am trying to get it so that the image is aligned in the center of the div and on the complete bottom of it. Can anybody help me with this? How would I go about doing this?
Jordonias is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 08-10-2006, 11:23 AM   #2 (permalink)
Inactive
 
gaz545's Avatar
 
Join Date: 05-01-06
Posts: 166
iTrader: 0 / 0%
Latest Blog:
None

gaz545 is on the right pathgaz545 is on the right pathgaz545 is on the right path
Code:
img { left: 50%; top: 50%; }
Note that it will apple to every image.
gaz545 is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-10-2006, 11:28 AM   #3 (permalink)
Empress™
 
chicgeek's Avatar
 
Join Date: 08-19-04
Location: York, UK
Posts: 17,931
iTrader: 0 / 0%
Latest Blog:
My Favourite Poem

chicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest order
change that to

bottom: 0%
__________________
laura / chicgeek
soprano & web designer
laurakishimoto.ca
chıcgeeĸ @ flickr
chicgeek is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-10-2006, 11:30 AM   #4 (permalink)
Inactive
 
gaz545's Avatar
 
Join Date: 05-01-06
Posts: 166
iTrader: 0 / 0%
Latest Blog:
None

gaz545 is on the right pathgaz545 is on the right pathgaz545 is on the right path
oh my bad, didn't read it correctly.
gaz545 is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-10-2006, 11:41 AM   #5 (permalink)
Inactive
 
Join Date: 08-09-06
Location: Lafayette, LA
Posts: 10
iTrader: 0 / 0%
aaron lozier is liked by many
img inside div

Here is how I would do it.

Suppose your HTML looked like this:

<div id="myDiv">
<img src="myImg.jpg />
</div>

Your CSS should look like this: (remove style tags if using stylesheet)

<style>
#myDiv
{
width: 804px;
height: 100px;
position: relative;
}

#myDiv img {
width: 500px;
height: 70px;
position: absolute;
bottom: 0px;
left: 152px;
}
</style>

By placing the "position: relative" definition in your div, the div becomes the reference point for child elements, such as your image. You may then "absolutely position" the image, 0 pixels from the bottom, and 152 pixels from the left.

Let me know if this helps.
aaron lozier is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-10-2006, 11:44 AM   #6 (permalink)
Member
 
JuggoPop's Avatar
 
Join Date: 10-09-03
Posts: 9,594
iTrader: 0 / 0%
Latest Blog:
None

JuggoPop is a web professional of the highest orderJuggoPop is a web professional of the highest orderJuggoPop is a web professional of the highest orderJuggoPop is a web professional of the highest orderJuggoPop is a web professional of the highest orderJuggoPop is a web professional of the highest orderJuggoPop is a web professional of the highest orderJuggoPop is a web professional of the highest orderJuggoPop is a web professional of the highest orderJuggoPop is a web professional of the highest orderJuggoPop is a web professional of the highest order
that's what i was thinking... good job there.
JuggoPop is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
'Unable to save image' error for sig image danparks V7N Forum Support 20 02-22-2008 04:13 PM
Position image inside a CSS box? jolene Coding Forum 1 07-01-2004 10:22 AM
Can a 'swap image' graphic contain image mapping? lizbeth Coding Forum 2 04-22-2004 02:32 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 09:53 PM.
© Copyright 2008 V7 Inc