Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 4 days ago.
Improve this question
I'm new to HTML and CSS and I'm slowly learning the language. I have put classes with names on my html divs but they are not connected to their respective css styles. what seems to be the problem?
I put classes on my divs, expecting the styles to affect all of the elements within the divs but they do not seem to be connected and I am starting to wonder if it is even possible to put classes on divs.
ps. thanks guys, problem solved, problem was due to misspelling of the div
I just suggest you use Bootstrap. It has predefined classes, structures and widgets that you can use on the go. Following are the websites you can take help from to learn HTML and CSS.
For HTML and CSS Basics, refer to w3schools.
From Bootstrap, refer to bootstrap.
Hope it will help to understand and learn HTML and CSS.
Thanks
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Hello and thanks in advance. In HTML I know that a "class" will not really have an effect unless it is related to something in CSS or JS. At the same time, I find some "classes" that do affect the structure of a documents even without an associated CSS, such as "class="col-md-12" for example. Can someone explain why some classes work independent of CSS? And how to know them.
class="col-md-12" still requires CSS. That is a common class for a framework such as BootStrap. On its own without JavaScript or CSS, a class does nothing besides tell another programmer what an element is for.
The idea of classes ("class=''") and identifiers ("id=''") is part of DOM manipulation. You can put in classes and id's in each of the tags as you desire. Normally, the rule is an independent id for each tag, and a class for each GROUP of identical tags.
To make use of classes, you are required to use CSS, be it at the top of the page, or linked to another page. If you have your CSS at the top of the page, you do not need another CSS page, however most designers will frown from that.
See here for a more in-depth explanation: https://css-tricks.com/the-difference-between-id-and-class/
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I'm sorry for bothering you, but can you tell me (or just copy) all html5 structural elements, I'm googling but there is information only about new html5 elements, old one are excluded. And when i googled HTML structural elements, every site write different elements. I have to write about html5 structural elements for exam in my school.
Thank you.
Sounds like you might want to take a look at this - the documentation on Element by the Mozilla Developer Network.
It looks like they did miss one (as pointed out by cezar) in that list though, aside. Somebody should fix that. ;)
This also would probably be probably interesting to look at.
Here is a link from the World Wide Web Consortium Wiki:
http://www.w3.org/wiki/HTML_structural_elements
According to it the old structural elements of HTML are:
div
span
and the new ones from HTML5 are:
header
footer
nav
article
section
aside
I hope this helps you.
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 a website that uses CSS3 colums to break up the text of the article to three columns. In it's current state, there is a few paragraphs, an unordered list and a few more paragraphs.
I want the article to essentally read like a newspaper, but CSS is breaking this up in a really perculiar way, and I cannot figure out how to fix it. The current website is the Hospital Safety Store. Thanks for your help!
Quite frankly, with purely css and nothing else you can't split the contents of a single div across multiple columns like that.
Each column should be it's own DIV, which means you'll have to pre-split the article into three. You could do this manually but it'd probably less of a headache to write some php on the back-end to break up the article programmatically.
I'd typically have one container-div that is the full width, and then have child div's for the different columns.
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 was wondering why the children comments I have are getting put into the header of the next parent comment which they aren't even related to. I tried looking at errors in my html that may cause this but as far as I can tell there aren't any.
The website that contains the issue I am talking about is:
http://web.engr.illinois.edu/~hauger3/
Thank you to anybody who knows why this is happening and can tell me how to fix it.
Note: It will probably be better to look at the html through developer tools as the source looks nasty.
The problem is that your using pull-right which floats the element.
You can easily fix this by adding clear: both; to .panel
It's because of .pull-right class in child comment that adds floating float: right. Change it to padding for example.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am having a hard time creating clean maintainable HTML/CSS code. Is there an editor, book or webpage that can help me using best practices.
This is some examples:
Naming of divs and classes: You might have an area with a user profile. How would you name the id and classes? (#author_profile, .username, .userBirthday etc.)
Tags or divs: A lot of times I am getting confused on when to create my own divs or use a tag with id/class. Any good examples?
Positioning: 99% of the times I set a fixed width on the elements and use float: left/right. Any tips on making CSS positioning more accessible. I have tried a lot of CSS frameworks, but this has not worked for me. Always ends up with deeply nested divs and a lot of classes.
Here you go Web Page Development: Best Practices.
http://net.tutsplus.com/tutorials/site-builds/from-psd-to-html-building-a-set-of-website-designs-step-by-step/
Start at Nettuts...where i learnt everything i know (pretty much)
You may as well use this chrome plugin called CSS Brush to check it live on the webpage. The context-sensitive-menu helps you see what all properties exist for a particular style and apply to the element live. After you have done with all the CSS, you may copy them all and paste in your CSS file.