- This topic is empty.
-
AuthorPosts
-
July 29, 2013 at 4:37 pm #145079
pittles78
ParticipantOn this page shown here:
http://superluxefibers.com/services/relabel/
I have used span on the top paragraph to increase text size. I know that there is paragraph CSS telling it to be default size that the span is overriding. What I would like to do is have a selector of some sort that is specific to certain paragraphs.
Basically leaving the default text size of paragraph, but adding a separate size that I can universally call upon to replace always using span.
I’m sure this is pretty elementary, but I can’t figure it out.
Best,
JonJuly 29, 2013 at 4:44 pm #145081TheDoc
MemberYou could do something like:
p:first-child { font-size: /* whatever */; }
But you’d probably have to be more specific than that, because you likely don’t want to target all of the paragraphs throughout the site.
July 29, 2013 at 4:47 pm #145082pittles78
ParticipantGreat, so what exactly would the html look like for that css?
July 29, 2013 at 4:48 pm #145083pittles78
Participant<
p class=”first child> ???
July 29, 2013 at 4:51 pm #145084TheDoc
MemberYour HTML wouldn’t change at all. You could just get rid of your
.
Codepen: http://codepen.io/ggilmore/pen/c79f7b3f006a3cfdc7358b7cb87192b3
July 29, 2013 at 4:53 pm #145085TheDoc
MemberUgh. The markup isn’t rendering properly in the forum. I’ll post to Codepen.
July 29, 2013 at 4:54 pm #145086pittles78
ParticipantOk thank you so much.
July 29, 2013 at 5:06 pm #145087pittles78
ParticipantI am using shortcodes for the page formatting and the div inside the shortcode doesn’t render properly. Any tips?
Here is what I have on the WordPress side:
<h1>Relabel Printing</h1> \[full_width_section bg_pos="Left Top" bg_repeat="No-Repeat" text_color="Dark" image_url="" top_padding="40" bottom_padding="40" background_color=""\] \[one_half\] If you are really trying to “go there” with your branding, then custom relabel prints are whats up. Your single color tag gets printed with all of the necessary legal info and then we’ll cut out the existing manufacturer’s tag. On some occasions, custom relabel projects can add to our typical turnaround time, but we’ll let you know up front. Your tags get printed with the minimum amount of ink for softness and to prevent the ink from bleeding through to the back. Regardless, you can always see something printed on the inside of a sheer lightweight, light colored tee. Just saying. [/one_half] [one_half_last] [
][1] [/one_half_last] [/full_width_section] [1]: http://superluxefibers.com/wp-content/uploads/2013/07/tuff-relabel.jpg
July 29, 2013 at 5:38 pm #145089Alen
ParticipantI am using shortcodes for the page formatting
Why?
and the div inside the shortcode doesn’t render properly. Any tips?
Show us the function that renders this shortcode?
July 29, 2013 at 5:43 pm #145090pittles78
ParticipantThe div does work with the shortcode after all. I was mistaken. It is functioning properly now.
July 29, 2013 at 9:55 pm #145110Martin Duran
ParticipantWhile I absolutely adore selectors, particularly first-child, because it’s supports down to ie7, I wouldn’t suggest using it, unless you plan on only changing style for the paragraph of your parent div. Instead, I’d recommend you define styles for the strong tag and use it when you want your paragraph to inherit larger font-size, or whatever styles you declare. I understand this to be your best option, as you can declare these styles whenever you choose, whereas first-child is selective.
July 29, 2013 at 9:57 pm #145111pittles78
ParticipantHi Martin,
That is basically what I ended up doing. Just not with strong. I made a class called .bigger-text that I can use when I need. Is there an advantage to using strong?
July 29, 2013 at 10:11 pm #145113Martin Duran
Participantpittles,
Not necessary, but, whenever I can, I avoid creating unnecessary classes. Considering HTML provides a great set of tags, I hardly find the need to create classes anymore, especially since my adoption of SCSS. Personally, I think classless code makes for cleaner code.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.