liamC
Member
Registered: 28th Feb 04
User status: Offline
|
I have a 100pixel wide DIV, and a 75pixel wide image inside the DIV.
How do I align the image to go into the centre?
I can't work it out?
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
post your HTML/css
|
liamC
Member
Registered: 28th Feb 04
User status: Offline
|
This is the CSS code inside for the DIV ID
#vehicle {
background-color: #CCCCCC;
text-align: right;
width: 100px;
height: 100px;
border-color: #1758B9;
margin-left: 10px;
right: auto;
border-bottom-style: solid;
}
Basically I jsut want an image inside this 100x100 div, but aligned in to the centre
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
well changing the text align to center should do it, but im guessing its aligned to the right for a reason?
|
liamC
Member
Registered: 28th Feb 04
User status: Offline
|
Yup! I want the image in the centre, and the text to the right but it's proving to be a problem!!
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
You could do it in three parts. A div for the box you want to draw, a class for the image, and another div for the text.
You might be able to do it in 2 parts actually, You could leave that div as it is and make another class simply for the image telling the image where it should go. Not sure if that would work or not though...
|