Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
I have a search results page and I'd like to wrap each result in a simple box to differentiate between each group but I can't find anything on how to do this. All I found was w3schools page on the box model and that seems to affect the whole page so it isn't really what I'm looking for.
You'd need to wrap them in what's called a div this is essentially saying to a browser looking at the website "This is a block of something, treat it like that". You can create a div like this
<div class="result">Content in here!</div>
You can then assign all your divs the CSS class result this lets your use CSS code like
.result {
border: 1px solid red;
}
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I am working on my website and have drawn up how I wish to display my pricing info. putting it all into the table is easy enough, and i have found most of the initial questions. i have a border on the left, right and bottom of each tag, which line up with the top 3 nicely and similar to my drawing. the only question I have is to remove the cellspacing from only the top or bottom of each row. i tried using the collapse cell code which works great, except, then it eliminates the border-radius i wish to have. Ideas?
PICTURE
https://www.dropbox.com/sc/j2k1wh8ar5girwl/fcp52qP03n
CODE
https://www.dropbox.com/s/h3605tq9dhq5475/test.txt
USE THIS:
table, td, th {
border-collapse: collapse;
}
Sample AFTER: http://jsfiddle.net/theStudent/N2w3N/
Sample BEFORE: http://jsfiddle.net/theStudent/FJ69C/
Hows this one: http://jsfiddle.net/theStudent/N2w3N/1/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I'm building an alert page. I'm trying to make the page work even if javascript and CSS is failing.
I would like to use maybe deprecate HTML codes to do this. I need the span that contains the alert message to have a red background.
Please advise.
Try this :D
Example:
<div style="background-color:red"> </div>
You must insert the name of color like red, blue and so on.
You can use the bgcolor attribute to set the background colour, but it's far better to use CSS to style a page as the bgcolor attribute only works on certain tags.
<table bgcolor="#FF0000"><tr><td> My alert contents </td></tr></table>
For example it won't work on <span>, <div> or <p> tags, but will work on <body> and <table> tags.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to add a red notification bar to my site to display notices for example scheduled maintenance.
What code would I need to add to my site to enable this to work.
Thanks.
Just add a div with some styling to the top of your site.
<div id="notificationbar">
<p>Currently the site is down</p>
</div>
You can style it with css:
#notificationbar {
background-color: red;
}
#notificationbar p {
color: white;
}
You can do many things with it using javascript or css. If you don't understand the above, you should check out how to write HTML and CSS (try looking on google) or hire someone who does.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Is this possible?
How can i make my list(<li>) elements to be seen like table cells?
Update:
I need table look and feel, but also i need to use li tag,
I need to conserve the indentations
I do not need like this, I want the view when I delete the CSS (like this).
I found solution here
Thanks
If you want it to behave exactly like table add the following CSS:
ul, ol {
display: table;
}
li {
display: table-row;
}
Thought, for IE it works since version 8.
Here's the FIDDLE
Agree with Paulie_D. Please tell us little more about what you are trying to achieve.
But if you want to create a table like look and feel, you can add float to li and give padding or fixed height and width to individual <li>. You can also specify <ul> width, so it will wrap the <li> at a specific width.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I feel like this is a very simple problem but I can't seem to wrap my head around it. What I have is a bunch of divs added to a container. Then I want those divs to freely position them self in any white space, but they must move from top to bottom, left to right. I also can not adjust the order of the divs. Here is an example of my problem http://jsfiddle.net/8GMGF/1/. I need the blue box to automatically move into the free space above it. Thanks for any input.
PS. I also tried flexboxes but they don't seem to be able to use free space either. Maybe I missed something.
The result you are looking for (with the subtle tweaks you want to make) might not be possible with pure html and css, you may wish to look into using a tiling plugin such as Masonary for jQuery:
http://masonry.desandro.com/index.html