Centred descriptions

Page: 1

Author Post
Member
Registered: Feb 2013
Posts: 3
This is going to sound a bit strange folks but I'm really OCD when it comes to the positioning of text on my website.

The following PHP calls the first of ten images (within a <div> to allow for autostart).

<a class=&#039;floatbox&#039; href=&#039;$photolink$photo1urn.jpg&#039; title=&#039;$photo1description&#039;>1</a>


My problem is this.

In the bottom left is the phrase
Quote
Image 3 of 10
but the description of the photograph loaded (provided thanks to the "title" tag) doesn't align on the left above this line. It's centred independently above and off to the right.

Is there any way to change the justification of the description so that it looks like this:

Quote
Description of photo
Image 3 of 10
Administrator
Registered: Aug 2008
Posts: 3382
When the caption and 'image x of y' are both in the lower left corner - which they are by default - they are both left-justified and align exactly on the left side with each other. This can be seen on the gallery set right at the top of the demo page on this site. If you're getting different results, I'd need to look at a page online to determine why.
Member
Registered: Feb 2013
Posts: 3
That would be great.

http://www.didymus.org.uk/newsite/tree/photos.php?urn=11164

Could it be that it's inheriting a value from elsewhere in my HTML or CSS?

Thanks in advance for your help.
Administrator
Registered: Aug 2008
Posts: 3382
Line 57 of your main.css is:
div {text-align: center}

The "div" selector selects every div on the page, including the divs in the floatbox, and centers the text in each of them.

I'll have to leave it you to figure out how to better target the desired text-centering without disrupting elements that you don't want to be centered.
Member
Registered: Feb 2013
Posts: 3
Yep. You're quite right of course. That DIV was a placeholder I used before I finalised my design. It's removal hasn't affected my site at all but it HAS solved the problem I inadvertently created within Floatbox.

Thank you!

Page: 1