I've thought about this problem quite a bit.
Is there are way, say, to automatically insert a line decoration after each line (row) in a <div> or just any element that holds text?
For example:
This is the first line
This is the second line
I noticed this problem because underlines aren't ideal, and inserting a div or separating chunks of text in different divs is awkward. Because different characters have different widths in typography, If I used underscores the two lines become uneven in terms of width. I don't think tables can automatically separate a block of text in two rows. Not without some JQuery doing the split.
Is there something that will let define line decorations after lines ?
I need this because the text in the divs are coming from a database. I don't know the length of each line and so it's awkward If I assume a fixed number of characters per line and start chopping words in half at the end of lines,
like,
Hello World Wha
t is up.
Thanks!
Perhaps you can fake it with a "lined paper" effect. Here is one such result: http://css3.wikidot.com/blog:lined-paper-with-css
I'll copy it here to preserve it in case the original site moves or goes down.
The technique is quite simple - all we need is a repeating background gradient to give the effect of lines across the paper, and a pseudo element on the left to give the ruled margin.
.paper {
font: normal 12px/1.5 "Lucida Grande", arial, sans-serif;
width: 300px;
margin: 0 auto 10px;
padding: 6px 5px 4px 42px;
position: relative;
color: #444;
line-height: 20px;
border: 1px solid #d2d2d2;
background: #fff;
background: -webkit-gradient(linear, 0 0, 0 100%, from(#d9eaf3), color-stop(4%, #fff)) 0 4px;
background: -webkit-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px;
background: -moz-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px;
background: -ms-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px;
background: -o-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px;
background: linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px;
-webkit-background-size: 100% 20px;
-moz-background-size: 100% 20px;
-ms-background-size: 100% 20px;
-o-background-size: 100% 20px;
background-size: 100% 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.07);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,0.07);
box-shadow: 0 1px 2px rgba(0,0,0,0.07);
}
.paper::before {
content: '';
position: absolute;
width: 4px;
top: 0;
left: 30px;
bottom: 0;
border: 1px solid;
border-color: transparent #efe4e4;
}
In order to get all the text to line up properly on the lines, you need to specifically declare margins and line heights for all text elements. Given we used a background size of 20px above (i.e. it's 20px between the lines), we need to use a line height (or an equivalent line height + margin) of 20px.
.paper h1,
.paper h2 {
font-size: 16px;
line-height: 16px;
margin: 0 0 4px;
}
.paper h3,
.paper h4,
.paper h5 {
font-size: 14px;
line-height: 16px;
margin: 0 0 4px;
}
.paper h4,
.paper h5 {
font-weight: normal;
}
.paper p {margin: 0 0 20px;}
.paper p:last-child {margin: 0;}
.paper ul {margin: 0 0 20px;}
Browser support
It works perfectly in Webkit and Opera, and almost perfectly in Firefox (the ruled margins on the left are 1 pixel too short at one end). Theoretically it should work in IE10, but I haven't tested it.
Another way would be to just create an 1xN.png with 1 pixel filled in at the bottom. and set that as your background-image. Where N equals the line height like below:
<--- Just a speck.
You could also convert the image into a data URI if you are worried about adding an extra request.
CSS
div {
background-image: url("1x16.png");
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAQCAYAAADXnxW3AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXK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debug can hurt your eyes after a few hours.
http://www.designified.com/blog/article/76/restyling-xdebug-output describes how to replace the style with javascript requiring jquery.
I was looking for a more straight forward way and finally found one.
The solution is the !important tag, it overrides the existing style values. Use the following css code to avoid eye cancer when using xdebug:
.xdebug-error {
font-size: 12px !important;
width: 95% !important;
margin: 0 auto 10px auto !important;
border-color: #666 !important;
background: #ddd !important;
}
.xdebug-error th, .xdebug-error td {
padding: 2px !important;
}
.xdebug-error th {
background: #ccc !important;
}
.xdebug-error span {
display: none !important;
}
.xdebug-error_description th {
font-size: 1.2em !important;
padding: 20px 4px 20px 100px !important;
background: #ccc no-repeat left top !important;
}
.xdebug-error_callStack th {
background: #666 !important;
color: #ddd !important;
}
Have a nice xdebug!
Yes you can. Try this css below.
table.xdebug-error {
width: auto;
background: white;
border: none;
border-spacing: none;
border-collapse: collapse;
box-shadow: 0px 3px 10px 0px black;
position: fixed;
top: 0px;
right: 0px;
z-index: 8888;
font: 14px verdana;
transform-origin: top right;
transform: scaleX(0.4);
opacity: 0.3;
transition: all 200ms ease;
}
table.xdebug-error caption,
table.xdebug-error th,
table.xdebug-error td {
text-align: left;
vertical-align: middle;
}
table.xdebug-error a img {
border: 0;
}
table.xdebug-error :focus {
outline: 0;
}
table.xdebug-error pre {
margin: 0;
}
table.xdebug-error tbody tr td,
table.xdebug-error tbody tr th {
border: none;
border-bottom: 1px solid rgba(0,0,0,0.2);
font-weight: normal;
}
table.xdebug-error tbody tr td {
padding: 3px !important;
vertical-align: top;
}
table.xdebug-error tbody tr th {
padding: 13px !important;
}
table.xdebug-error tbody tr td:nth-of-type(1) {
width: 5% !important;
}
table.xdebug-error tbody tr th[bgcolor='#f57900'] {
font-weight: normal;
background: steelblue;
color: white;
}
table.xdebug-error tbody tr th[bgcolor='#f57900'] span {
display: none;
}
table.xdebug-error tbody tr font[color='#00bb00'] {
color: #005e00;
}
table.xdebug-error tbody tr td small {
display: none;
}
table.xdebug-error tbody tr td i {
padding-left: 12px;
}
table.xdebug-error:hover {
transform: none;
opacity: 1;
}
CONS:
Depending on your other css defs, you may have to fiddle a bit until it looks as promised.
It's not as beautiful as a Laravel/Symfony error
PROS:
You can see the actual page, despite the error. (Message will be dimmed and pushed on the right side, appearing on mouse hover.)
It's nothing more than CSS
You can even add it to your page via CSS Live Editor Plugin or something similar; therefore, no need to add to your own code
It won't break your styling, won't stuff a whole lot of text into a tiny container where the error happened, etc. - because it's position:fixed.
Pleasant to the eye - you'll end up throwing errors just to see it again :)
Another option is to disable xdebug from overloading var_dump.
In the php.ini [XDebug] section add xdebug.overload_var_dump=0
Formatting the output is then up to you; one such way could be wrapping var_dump in your own debug function that prints <pre> tags.
// notice the line height, the padding(cellspacing), monospace font, font size, making readability better at least for me.
//
// A FILENAME : xdebug_stack_trace.css
//
// This is how the xdebug_stack_trace.css is called from the index.php page
//
// <style><?php require_once("./resources/css/xdebug_stack_trace.css");?></ style>
//
// notice that on the line above there is a space between the slash
// and the 'style', on the ending 'style' tag, otherwise the display
// get all messed up when this page gets loaded.
//
// make sure that when you copy the 'style' line from here to the
// index page, that you remove the extra space at the ending 'style'
// tag of the index page.
// +---------+---------+---------+---------+---------+---------+---------+
// orange/black td header line
// +---------+---------+---------+---------+---------+---------+---------+
.xdebug-error th
{
font-family:monospace;
font-weight:normal;
font-size:15px;
padding: 6px 6px 6px 6px;
border:1px solid black;
background: #FFCC99; // orange
color:#000000; // black
}
// +---------+---------+---------+---------+---------+---------+---------+
// black/white th header line
// +---------+---------+---------+---------+---------+---------+---------+
.xdebug-error > tr:first-child > th:first-child,
.xdebug-error > tbody > tr:first-child > th:first-child
{
line-height:1.6em;
padding: 10px 10px 10px 10px;
border:1px solid #000000;
background: #000000; // black
color:#FFFFFF;
}
// +---------+---------+---------+---------+---------+---------+---------+
// green/black td content one or more lines
// +---------+---------+---------+---------+---------+---------+---------+
.xdebug-error td
{
font-size:14px;
padding: 6px 6px 6px 6px;
border:1px solid green;
background: #D1FFE8; // light green
}
// +---------+---------+---------+---------+---------+---------+---------+
Is it possible to modify selectize.js? Instead of having a dropdown it will open a modal box for its options ? I am thinking of having a onfocus event then it will open that modal but prevent the dropdown. I'm just not sure how I can achieve it. and How I can populate the selectize once the modal options have been saved
It's usually not a good idea to customize a code library because you will not be able to upgrade to the next version. You are better off rolling your own solution using js and css. Actually making modal boxes is not that difficult, you just need to float a div at a higher z-index than the rest of the page, then put a transparent layer behind it to keep the user from clicking through to the background page. Here is some sample css and html I use to float a modal.
css
.BDT_Dialog_Layer {
position: absolute;
display: table;
top: 0px;
left: 0px;
height: 99%;
width: 99%;
}
.BDT_Dialog_Center {
position:fixed;
top:30%;
width:100%;
}
.BDT_Dialog_Decoration {
position:relative;
margin:0 auto;
text-align: center;
background-color: #ffffff;
display: table;
/* -- background-color: #DDDDDD;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#FFFFFF' , endColorstr='#BBBBBB');
background-image: -webkit-gradient( linear, left top, left bottom, color-stop(0.1, #FFFFFF), color-stop(1, #BBBBBB) );
background-image: -moz-linear-gradient( center top, #FFFFFF 10%, #BBBBBB 100% ); -- */
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
-khtml-border-radius: 15px;
border-radius: 15px;
-moz-box-shadow: 0 1px 8px #666666, 0 1px 4px #000000;
-webkit-box-shadow: 0 1px 8px #666666, 0 1px 4px #000000;
-khtml-box-shadow: 0 1px 8px #666666, 0 1px 4px #000000;
box-shadow: 0 1px 8px #666666, 0 1px 4px #000000;
}
html
<div id="dialogLayer" class="BDT_Dialog_Layer">
<div class="BDT_Dialog_Center">
<div class="BDT_Dialog_Decoration">
My stuff
</div>
</div>
here is the blocking layer css
div.BlockInteractionWithPage {
position: absolute;
top: 0px;
left: 0px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
background-color: #ffffff;
opacity: 0.0;
filter: alpha(opacity=0); /* filter:alpha for IE8 and earlier */
height: 100%;
width: 100%;
}
I have a div that uses a border-image. The border width is 33px but the image doesn't fill the total width and has transparency.
I want to have a background color that would fill exactly the inside of my border.
Here is the code I came with:
http://jsfiddle.net/kvo8zyr7/1/
.content {
width: 500px;
height: 500px;
border: 33px solid;
border-image: image-url("interface/global/popup_border.png") 33 stretch;
margin: 0 auto;}
.sub-content {
position: relative;
left: -33px;
top: -33px;
width: 500px;
height: 500px;
border-left: 15px solid rgba(0,0,0,0);
border-top: 14px solid rgba(0,0,0,0);
border-right: 15px solid rgba(0,0,0,0);
border-bottom: 14px solid rgba(0,0,0,0);
background-color: #e4e2d7;
background-clip: padding-box;
z-index: -1;}
The problem is that all elements I have in my sub-content div are unclickable because the layer is behind...
Any ideas to whether:
Make the elements clickable
Have the same visual result with a different solution than mine that wouldn't make the elements unclickable?
Thanks in advance for your help.
Try this
.content {
width: 500px;
height: 500px;
border-width: 33px;
border-style: solid;
-webkit-border-image:url("http://i.imgur.com/SVFLQko.png") 30 30 round; /* Safari 3.1-5 */
-o-border-image:url("http://i.imgur.com/SVFLQko.png") 33 33 round; /* Opera 11-12.1 */
border-image:url("http://i.imgur.com/SVFLQko.png") 33 33 round;
margin: 0 auto;
}
In reply to your comment I corrected the jsfiddle and here's another solution jsfiddle which works better by just switching the content div inside the sub-content with adjusting the positions and removing z-index and after some search on z-index it seems the nested div you have is the problem as it will not be possible this way.
Some references to understand this:
1) Please read this About z-index for child and parent
2) And this Image frame border and z-index
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I have a forum system in php, but when the posts come out, if they're long, they end up like this,
html,
body {
height:100%;
width:100%;
background: url(/include/images/dirt.png);
}
.center-container {
margin-top:15px;
margin-right:15%;
margin-left: 15%;
box-shadow: 0 1px 10px #a7a7a7, 0 1px 0 #fff;
padding:0.5em;
}
.button {
border-top: 1px solid #002136;
background: #033e66;
background: -webkit-gradient(linear, left top, left bottom, from(#031826), to(#033e66));
background: -webkit-linear-gradient(top, #031826, #033e66);
background: -moz-linear-gradient(top, #031826, #033e66);
background: -ms-linear-gradient(top, #031826, #033e66);
background: -o-linear-gradient(top, #031826, #033e66);
padding: 5px 10px;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
-moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
box-shadow: rgba(0,0,0,1) 0 1px 0;
text-shadow: rgba(0,0,0,.4) 0 1px 0;
color: white;
font-size: 14px;
font-family: Georgia, serif;
text-decoration: none;
vertical-align: middle;
padding-bottom:3px;
margin-right:5px;
}
.button:hover {
border-top-color: #28597a;
background: #28597a;
color: #ccc;
}
.button:active {
border-top-color: #1b435e;
background: #1b435e;
}
.sidebar1 {
margin-top:15px;
float:left;
width:13%;
display:inline-block;
box-shadow: 0 1px 10px #a7a7a7, 0 1px 0 #fff;
}
.sbutton {
border-top: 1px solid #002136;
background: #033e66;
background: -webkit-gradient(linear, left top, left bottom, from(#031826), to(#033e66));
background: -webkit-linear-gradient(top, #031826, #033e66);
background: -moz-linear-gradient(top, #031826, #033e66);
background: -ms-linear-gradient(top, #031826, #033e66);
background: -o-linear-gradient(top, #031826, #033e66);
padding: 5px 10px;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
-moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
box-shadow: rgba(0,0,0,1) 0 1px 0;
text-shadow: rgba(0,0,0,.4) 0 1px 0;
color: white;
font-size: 14px;
font-family: Georgia, serif;
text-decoration: none;
vertical-align: middle;
padding-bottom:3px;
display:block;
}
.sbutton:hover {
border-top-color: #28597a;
background: #28597a;
color: #ccc;
}
.sbutton:active {
border-top-color: #1b435e;
background: #1b435e;
}
is there a CSS rule that I can use to make that wrap to the next line?
EDIT: SOLVED! This actually seems to be a problem with Firefox. Not sure why, but if width is set in firefox, even if it is max-width, it will overflow the box for some reason
You can use the CSS3 text-wrap Property:
http://www.w3schools.com/cssref/css3_pr_text-wrap.asp
p.test {text-wrap:unrestricted;}
Your link doesn't work so I'm guessing here.
Most likely your div expands outside of the width of the screen, meaning that the content will to.
You could try to set the max-width property of your div to something like 80% (or less) and wrap any text in p-tags.
To be absolutely sure, combine that with superUntitled's answer and set:
p.test {word-wrap:break-word; }
EDIT
I tried your example and it works for me in this JsFiddle example
Try a css reset like this
yes, the CSS3 word-wrap in combination with the hyphen property
p.test {
word-wrap:break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
http://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/
I'm looking for ages to figure out how to add some space between my recent posts on a wordpress site.
Really have no idea. Anybody that could help?
You have 2 style statements that pretty directly affect these. One has bottom margin but is being overridden by another with margin: 0;. Change this to margin: 0 0 20px 0;.
.primary_content_wrap ul li {
background: url(images/marker.gif) no-repeat 1px 11px;
margin: 0;
padding: 0 0 0 17px;
list-style: none;
line-height: 25px;
font-size: 13px;
color: #005d9e;
}
.recent-posts li {
margin: 0 0 20px 0;
padding: 0;
border: none;
}
each of your posts is a li with an "entry" class :
<li class="entry">...</li>
it seems there's nothing in any CSS for that entry class. What I would do is define it in the CSS with a margin-bottom set to, let's say 10px.