The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

Reply to this topicStart new topic
> Vertical centering of a graphic
post Jul 12 2011, 02:07 PM
Post #1

Advanced Member

Group: Members
Posts: 189
Joined: 17-January 08
Member No.: 4,734

Look at page

There is a graphic saying "contents". I want it to automatically center itself at the left of the division with the actual contents. I created a division within the division and float:left. The problem is that I must specify an actual height. Using 100% causes part of the contents to appear below the graphic. Also I want it centered vertically and I do not know how to do it automatically. The contents can change size so I hate fixed heights. What can I do?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
post Jul 12 2011, 11:18 PM
Post #2

Don't like donuts. Don't do MySpace.

Group: WDG Moderators
Posts: 17,459
Joined: 9-August 06
Member No.: 6

Easiest by making it background image. Maybe it shouldn't be a background, but given the alt text you use, it doesn't matter really. tongue.gif

Remove the image and the DIV it's in altogether. Add the image as a background for #buttons, make it no-repeat and position it 50% down. Give #buttons some 50px left padding to make the text go free from the image and a little more to make it look nice.
User is online!PM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


- Lo-Fi Version Time is now: 22nd February 2017 - 12:28 PM