Re-used CSS names
cambler
Registered Users Posts: 277 Major grins
I'm trying to get rid of the header text and links that show up inside of categories and galleries.
I accomplished this for one of the headers by adding a CSS override for .headmd to set the font-size to 0px.
The problem is that the other header, the one that has "account's home" as well as the breadcrumb navigation (account's home > Gallery) is styles with .headlg, but that CSS name is also used for the gallery names as well.
So if I set the font size to 0px to turn off the header and breadcrumbs, I'm also turning off the title of the gallery.
I've always found it to be good design methodology to never re-use CSS style names for just this reason.
Any way around this problem?
In essence, I woulnd't mind it so much if the "account's home" text were customizable. I find the posessive and "home" to be less than professional.
Guidance?
I accomplished this for one of the headers by adding a CSS override for .headmd to set the font-size to 0px.
The problem is that the other header, the one that has "account's home" as well as the breadcrumb navigation (account's home > Gallery) is styles with .headlg, but that CSS name is also used for the gallery names as well.
So if I set the font size to 0px to turn off the header and breadcrumbs, I'm also turning off the title of the gallery.
I've always found it to be good design methodology to never re-use CSS style names for just this reason.
Any way around this problem?
In essence, I woulnd't mind it so much if the "account's home" text were customizable. I find the posessive and "home" to be less than professional.
Guidance?
Photography: http://www.AmblerPhoto.com
Cheerleading: http://www.CheerPhoto.com
Blog: http://cambler.livejournal.com
Cheerleading: http://www.CheerPhoto.com
Blog: http://cambler.livejournal.com
0
Comments
Of course, what would be even better would be if all of the pages were replacement templates. That is, the breadcrumb showing up in the template as, for example, %%BREADCRUMB%% or some other tag, allowing customization of the div tag directly as well as the expected CSS names.
But that would be a huge feature on your part, so I'm not asking for it as much as waxing poetic on how cool it would be if all functional elements could be placed inside of custom HTML like that. :-)
Cheerleading: http://www.CheerPhoto.com
Blog: http://cambler.livejournal.com
-w
-w
On the home page, the "cheerphoto's home" isn't an "a" tag - it's a strong tag of class "offblue" inside of a TD tag of class headlg.
On a gallery page, it is an A tag, but the href is simply "/" and not the base location. This, inside of a strong tag of class "offblue"
Cheerleading: http://www.CheerPhoto.com
Blog: http://cambler.livejournal.com
I just put the code to the JavaScript section but it's not doing anything.
Can you please tell me how exactly and where I put this code to remove or change it to home from lenscapephoto's home.
clap
'you don't take a photograph, you make it.' - Ansel Adams
http://www.lenscapephotography.com
Put this in the body field:
Put this in javascript field: If you want to simply remove the header, remove the two // marks before tag.parentNode
HTH,
-w
}
'you don't take a photograph, you make it.' - Ansel Adams
http://www.lenscapephotography.com
I think this should do the trick for you.
-w
won’t work with http://photos.lenscapephotography.com.
'you don't take a photograph, you make it.' - Ansel Adams
http://www.lenscapephotography.com
<script for="window" event="onload">
try
{
var sName = "lenscapephoto"; // CHANGE ME to your display name
var re1 = new RegExp(sName + "'s home<","g");
document.body.innerHTML=document.body.innerHTML.replace(re1, "Home<");
var re2 = new RegExp(sName + "'s[ ]+[^\f\n\r\t\v]+home","g");
document.body.innerHTML=document.body.innerHTML.replace(re2, "Home");
} catch(e) {}
</script>
Cheers,
David
SmugMug API Developer
My Photos
Thanks for the code. Should I put the entire to the footer section?
'you don't take a photograph, you make it.' - Ansel Adams
http://www.lenscapephotography.com
SmugMug API Developer
My Photos
'you don't take a photograph, you make it.' - Ansel Adams
http://www.lenscapephotography.com
Devbobo, try putting code tags around your code next time. It seems to help, but not fix most of those kinds of problems.
-w
-w
What would make scripts like this work better would be if SmugMug had a unique ID for each tag or division.
That, like avoiding re-using CSS names, is also good HTML :-)
Cheerleading: http://www.CheerPhoto.com
Blog: http://cambler.livejournal.com
Cheerleading: http://www.CheerPhoto.com
Blog: http://cambler.livejournal.com