corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » DIV/CSS Help


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author DIV/CSS Help
liamC
Member

Registered: 28th Feb 04
User status: Offline
4th Jan 07 at 16:25   View User's Profile U2U Member Reply With Quote

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
4th Jan 07 at 16:37   View User's Profile U2U Member Reply With Quote

post your HTML/css
liamC
Member

Registered: 28th Feb 04
User status: Offline
4th Jan 07 at 16:44   View User's Profile U2U Member Reply With Quote

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
4th Jan 07 at 16:46   View User's Profile U2U Member Reply With Quote

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
4th Jan 07 at 17:21   View User's Profile U2U Member Reply With Quote

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
4th Jan 07 at 22:51   View User's Profile U2U Member Reply With Quote

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...

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
HTML Help Doug Geek Day 2 465
20th Mar 06 at 20:43
by Doug Corsa
 
CSS webdesign help Houckham Geek Day 3 894
20th Apr 06 at 11:01
by Houckham
 
After Constructice Criticism Bart Geek Day 41 2281
5th Sep 06 at 08:33
by James
 
FAO: Webmasters: CSS Bart Geek Day 14 1125
24th Oct 06 at 14:57
by Ian
 
Input on a website please, web designers especially :D drunkenfool Geek Day 56 3016
25th Nov 06 at 19:08
by aPk
 

Corsa Sport » Message Board » Off Day » Geek Day » DIV/CSS Help 28 database queries in 0.0096190 seconds