deLight customization – no floating smileys
Thursday, September 11th, 2008 | (X)HTML/CSS
I just installed webdemar‘s very nice deLight theme. But as soon as I wrote my first post I was disappointed ’cause my smiley wasn’t aligned properly. It was positioned on the left border, completely torn apart from the context I wanted to use it in.
There are more things that in my opinion could need some tweaks, I will write about these in future posts, let’s just stick to the smiley problem.
The solution is very easy: As the CSS properties of the smiley reveal, the smiley is floating and has a margin. Both properties are not suitable for elements that should be displayed inline. Originally these CSS props where used to align pictures left – I don’t know whether you need this option anyway ’cause you can align pictures while inserting them into your post. Anyway, this is the CSS that’s causing the problem:
.box-left img { float:left; margin:0 10px 10px 0; } |
I didn’t want to change the original code, so I inspected the smiley element again, just to see that a smiley image comes with the CSS class wp-smiley. How nifty! So what I did is adding these lines to the CSS file:
.box-left img.wp-smiley { float:none; margin:0; } |
Et voilá, no floating, no margin for smileys and no other element harmed!
If you don’t want to mess up your theme’s CSS use so called Child Themes as webdemar describes here for the deLight theme: WordPress Child Themes
1 Comment to deLight customization – no floating smileys
[...] from the CSS which is basically the same as commenting it all out. This also renders my the smiley post obsolete – in the end a smiley is just an image, too. If someone found a way to change this [...]
Leave a comment
Search
Categories
- (X)HTML/CSS (5)
- Activities (30)
- Gadgets (35)
- Insights (2)
- Java (22)
- Certification (1)
- IDE (10)
- JSP (1)
- Language (16)
- Quirks (9)
- Vocabulary (10)
- Linux (16)
- Misc (58)
- Photography (16)
- Reviews (70)
- Tech-savvy (81)
Tag Cloud
Archives
- May 2013 (4)
- April 2013 (1)
- March 2013 (1)
- February 2013 (1)
- January 2013 (1)
- December 2012 (3)
- November 2012 (1)
- October 2012 (3)
- September 2012 (3)
- July 2012 (1)
- May 2012 (1)
- April 2012 (1)
- February 2012 (7)
- January 2012 (1)
- December 2011 (2)
- November 2011 (4)
- October 2011 (5)
- September 2011 (3)
- August 2011 (3)
- July 2011 (2)
- June 2011 (4)
- May 2011 (1)
- April 2011 (2)
- March 2011 (2)
- February 2011 (2)
- January 2011 (6)
- December 2010 (2)
- November 2010 (5)
- October 2010 (7)
- September 2010 (13)
- August 2010 (6)
- July 2010 (4)
- June 2010 (3)
- May 2010 (3)
- April 2010 (2)
- March 2010 (2)
- February 2010 (1)
- January 2010 (1)
- December 2009 (1)
- November 2009 (2)
- October 2009 (5)
- September 2009 (1)
- August 2009 (3)
- July 2009 (5)
- June 2009 (5)
- May 2009 (6)
- April 2009 (3)
- March 2009 (3)
- February 2009 (2)
- January 2009 (1)
- December 2008 (9)
- November 2008 (15)
- October 2008 (15)
- September 2008 (13)
17. September 2008