This is a discussion on "an element positioning question" within the Web Page Design section. This forum, and the thread "an element positioning question are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
an element positioning question
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
an element positioning question
hello
I have a division with a small picture as a background with: background-position: center left; ...so that the picture appears centered on the left in the division. I also want to put a checkbox right under the background picture, and I guess I'll have to position it relative to the center of the division (because the division height is not always the same). Is this possible? Thank you! |
|
|
|
#2
|
|||
|
|||
|
Re: an element positioning question
I'm not sure what you mean. Could you post a link?
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
#3
|
|||
|
|||
|
Re: an element positioning question
hmmmmm......Why would you position a background image center, left?
If you just had the div the same size as the image, you wouldn't need any positioning. That would make it much easier to align the checkmark. Maybe a link as swagner said or more clarification is necessary. |
|
#4
|
||||
|
||||
|
Re: an element positioning question
Just a side note, you're using "center left" incorrectly. It should be "left center" or you could use numbers to save a few bites.
|
|
#5
|
|||
|
|||
|
Re: an element positioning question
I position it center left, because I need the picture there. Everything else is transparent background.
The div's heght is always different, depending on the length of the text content inside. That's why I cannot set the div size the same as the image... But I still have to find a way to position the checkbox right below the image. If I was not clear enough, please let me know... Thanks! |
|
#6
|
||||
|
||||
|
Re: an element positioning question
You'll have to do it on an individual basis, I'm afraid. You could write up a script in PHP that would check the image size and add separate style tags to each div. CSS cannot do this, however.
And as for the "center left" thing, I mean it's an organizational error. Left and Right positioning comes before top and bottom. I.E., putting "center left" is not the correct order, "left center" is. The way you have it can cause issues in certain browsers. |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How To Fix <TD> Element Size? | ivan | Web Page Design | 6 | Dec 11th, 2005 18:43 |
| using params in xsl IF element | zzqproject | Other Programming Languages | 0 | Nov 21st, 2005 23:12 |
| <img> element - positioning at center | jswebdev | Web Page Design | 4 | Sep 21st, 2005 17:49 |
| Positioning Question | Audioz | Web Page Design | 0 | Dec 8th, 2004 14:57 |
| XHTML Block Element in an Inline Element | gohankid77 | Web Page Design | 6 | Jul 27th, 2004 10:15 |