Sometimes we have a one-line div, having 3 elements. One floats to the left, one floats to the right, and one in the middle. The one in the middle often gets pushed around by the left/right element, resulting off-centered. related question.
The fix is to give the following css to the center div.
Thanks to the following link. =)
Sometimes I have a long continuing string inside a table that messes up my table width. For example,
That will give you a very wide column… Just how to squeeze the column to the width we specify?
“Easy,” you might say, “just set the td width!”
Nope. It turns out the same, one long continuous string.
The root problem here is that, the table width is determined by the content, but not the width we specify!
There is this css attribute for the table called table-layout, it disables the usual auto-layout and follows the widths specified. Thus our table will not be shaped by the table content.
OK… So our column now has the specified width, but now the long string goes out of the table column. The content spills over. Even though this is the default behavior in html, it doesn’t look right.
Luckily there is this css attribute called word-wrap. Its function is to break up long continuous words.
So there you have it, table-layout: fixed and word-wrap: break-word will fix the issue.
Too bad wp-codebox contains two divs namely wp_codebox_msgheader and wp_codebox, we cannot simply give the box-shadow to one single div. After playing with this a bit, here is my parameters. The css file is located at /your-wp-root/wp-content/plugins/wp-codebox/css/codebox.css.
box-shadow: 6px 14px 11px #808083;
box-shadow: 7px 10px 10px #888;
The overlapped area seems smooth with this setting.
I also added bottom margin to the codebox, see if you like it.
At last! These guys did it! If you like CSS and you are playing with it, you will probably want to check out these two online mini CSS IDEs. They are JS Fiddle and CSS Desk. I will be placing these two at my tools page.