View Full Version : Quick Question - Centering Html Only Galleries
Alarcon
Jan-23-2009, 04:09 PM
I've looked at a number (which is higher than I care to admit...) of threads on this, but can't seem to get it to work. I have two html-only galleries:
http://www.aarondill.com/gallery/7165587_yFFvs
and
http://www.aarondill.com/gallery/7166199_WkWBe
I'm basically happy with them, except that the whole page is left-justified rather than centered (like all my other pages). The whole shebang is over to the left, not just my table. I've tried adding <center> </center> tags, along with a couple other solutions from the forums, to no avail.
How do I fix that? I know very little about CSS or html - putting together this site has been my first experience with either. Thanks for your help!
Aaron
jfriend
Jan-23-2009, 04:22 PM
First of all, you have this stuff in your album description which just doesn't belong here:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Aaron Dill Photography Info</title>
</head>
<center>
<body style="width: 760px;" alink="#3366ff"
bgcolor="#000000" link="#66ffff" text="#ffffff"
vlink="#cc66cc">
If you can take it out of any galleries you put it in, I can help you get to where you want with CSS style rules, but right now this stuff is interfering with getting to where you want and I can't really take you to the next step until you remove it.
Alarcon
Jan-23-2009, 04:59 PM
I took that all out, but that made it significantly worse. You can see the results here:
http://www.aarondill.com/gallery/7165587_yFFvs
The fonts are all wacky, and all the table formatting disappeared. I'm making the page in "Nvu", then copying the code into my gallery description.
Thanks!
jfriend
Jan-23-2009, 05:08 PM
I took that all out, but that made it significantly worse. You can see the results here:
http://www.aarondill.com/gallery/7165587_yFFvs
The fonts are all wacky, and all the table formatting disappeared. I'm making the page in "Nvu", then copying the code into my gallery description.
Thanks!
OK, let's take one step at a time.
Remove this from your CSS box:
#albumDescription {
text-align: center !;
}
Then, add this CSS to your site-wide-customization:
.gallery_7165587 #albumDescription {width:760px; margin: 0 auto;}
That will center the albumDescription on the page.
Now, you just need to get the HTML in the albumDescription cleaned up. It is really damaged with all sorts of missing font tags. I'll see if I can repair it for you and post in a few minutes.
Alarcon
Jan-23-2009, 05:12 PM
I really appreciate your help - thank you!
That bit of CSS got everything centered. Looking at what's there now, it looks like a trail of some of the font changes I made in Nvu. I wonder if that program isn't really putting together very clean code, but just sticking more font instructions on top of everything whenever a font is changed?
jfriend
Jan-23-2009, 05:19 PM
OK, let's take one step at a time.
Remove this from your CSS box:
#albumDescription {
text-align: center !;
}
Then, add this CSS to your site-wide-customization:
.gallery_7165587 #albumDescription {width:760px; margin: 0 auto;}
That will center the albumDescription on the page.
Now, you just need to get the HTML in the albumDescription cleaned up. It is really damaged with all sorts of missing font tags. I'll see if I can repair it for you and post in a few minutes.
Nvu definitely made some pretty junky HTML. I can help you restore the HTML to get the right look, but I need some guidance on what you want it to look like. For some reason, when you took out the body text, all sorts of other stuff got messed up in this HTML. There is no table formatting at all and all the font tags are messed up. If you want to just format the text in MS Word and send it to me by email, then I can try to duplicate that in HTML.
jfriend
Jan-23-2009, 05:22 PM
Nvu definitely made some pretty junky HTML. I can help you restore the HTML to get the right look, but I need some guidance on what you want it to look like. For some reason, when you took out the body text, all sorts of other stuff got messed up in this HTML. There is no table formatting at all and all the font tags are messed up. If you want to just format the text in MS Word and send it to me by email, then I can try to duplicate that in HTML.
I have to run out for a few hours, will be back on line later this evening to help sort this out.
Alarcon
Jan-23-2009, 05:28 PM
I just restored the page to what it looked like before I deleted the junk from the beginning (and it's back to not being centered). Does that help? I could probably lay that out in Word later this evening, and email it, if that would be easier.
Thanks Again!
Alarcon
Jan-23-2009, 06:13 PM
I don't know exactly what combination of html incantation I did, but it looks better now. After you pointed out how much junk was in the original code I had, I re-made the page. I tried to get everything formatted the way I wanted it from the get-go, rather than tweaking it with the WYSIWYG buttons in Nvu. I left the CSS code you gave above in my site-wide customization page. I don't know if that's what did it, but both galleries are displaying formatted text that's centered.
I'd like to get past the -cut and paste snippets from other pages- style of page building. Any suggestion on where to learn the "whys" of what I'm doing? Or at least a better web page builder than Nvu?
Thanks for all your help - I spent way too long last night trying to figure this out, with no luck.
Any suggestion on how to improve what's up there now would be much appreciated!
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.