i've been trying to create pattern for my website using div elements. The problem is than my knowledge in css is very limited and i've no idea how to make the pattern like this
I tryed to use block, inline-block, but were not able to achieve the pattern i'm targeting to.
It's possible to do it with table, but than code looks like piece of thing.
It would be great if you will help me, because doing this not only to create a web site but also to learn css, so comments are really welcome.
Thank you in advance
make a parent div and add all properties to that like width of the container and height of the container. then add css property to each element individually or by grouping in class
Related
I don't know how can I delete blank spaces between vertical blocks. Example:
I want that all blocks are located under each other. Each block have display: inline-block. I experimented with position and display, but all in vain.
Please send me the URL First,You can use jQuery Masonry
you must embed in in your website,and you can use CSS techniques to fix the issue
you can see the demo in here
and please note that, you can define a class for those object and interact with them using CSS code,you can define specific height for them,please note that the images are not loaded correctly in your web page and you have to fix them first
if you have any other question,please feel free to ask me.
Good Luck.
PS: there are some other alternatives exists for the jQuery Masonry,one is Isotope and the other is a CSS-Driven tool Called Salvattore
I'm trying to figure out how to develop a page that we can use to organize a magazine. There will be multiple sections to the magazine that will contain multiple pages, each page may have multiple articles on them. To accomplish this, I want to have a DIV for each page or section that will intent to show that it's subordinate to the group above it. Here's a picture of what I want it to look like:
http://chromaticinc.com/help/final.png
I'd like to only use CSS to accomplish this. So far, I've come up with this:
http://chromaticinc.com/help/
But it is using Javascript to set the width on the 1st column, because each of the other columns has to line up too and with the variable width on the 1st column, it throws off the layout. I'm sure I could use Javascript to set the width of the "Comments" column, but I feel like there has to be a better solution using CSS.
I'm open to using tables, if it would make sense, but each item will have to be draggable so that they can be rearranged and also they will have to be able to be moved into other sections, so I've set them in DIVs to make that easier.
Any help or suggestions would be greatly appreciated.
You should be able to do this using relative positioning.
You will want to give the element an id and then use some CSS like this:
#divid {
position:relative;
left:20px;
}
This will force the div to move over however much you specify from its default position.
Browsers I'm using for testing: IE, Chrome, FF;
Ideal layout example pdf: http://designobvio.us/dov2/Homepage1.pdf
Heres the link to the direct page http://designobvio.us/dov2/index.html
While Grid systems are excellent for laying out by width, I always stumble when using height constants.
Inside my code I have 2 major problems:
Ideally, I want to be encapsulate sections of my code by using
parent div that controls the height, margin-top. I've tried to
create this div colored a pale green and padded it for visuals.
this class is shown here:
siteBody #businessSection{ padding-bottom:200px; background:#0F9;}
I've also demonstrated idea in this imageURL: http://www.designobvio.us/dov2/Homepage1Encapulate.pdf
While trying to do this I've come up completely empty handed.
2.So next, I tried breaking down each section individually by using a class .businessInfo
#siteBody .businessInfo{height:200px; background:#ccc;}
Unfortunately this also didnt work and I have no idea why because all the grids line up perfectly.
I hope what I've stated above is understandable. I prefer solution one; however, if not possible 2 will work.
If I'm missing anything I'll response ASAP.
Thanks!
this problem stems from the use of float. For example problem : http://jsfiddle.net/GAvcL/
you can use clear attribute for solve problem.
Solution:
http://jsfiddle.net/qeDs3/
This is a common problem in html. Before closing the div that encapsulates the divs using float, use a div has clear attribute.
Here's the layout I'm trying to achieve http://jsfiddle.net/qeDs3/44/
I mocked it up on Indesign using Grid_960 templates: http://designobvio.us/dov2/Homepage1.pdf
Here are the divs I cannot make parents out of http://designobvio.us/dov2/Homepage1Encapulate.pdf
Through trial an error, grid 960 seems forces you to use the class container_12 in conjunction to .grid_12 as the parent tag.
Here's another full example: http://designobvio.us/dov2/index.html
How can i get gChild to be the parent
Heres paired down example: http://designobvio.us/dov2/index2.html
I'm trying to get the header tag to be the parent of its contents.
Does my layout not cooperate with grid960? Am I totally missing something stupid? Does it require a hack? If you need any clarification of anything I'll be right here and will response ASAP.
Thanks
Update The reason I'm trying to do this is so that I may gain control of those parent divs for ease of media query.
After EXTENSIVE research (lol) I've finally solved this problem.
Grid 960 has 2 extra classes which simply remove margins left and right named alpha & omega. I've never bothered learning the purpose/theory of these because I was dumb. The purpose of these classes are exactly what I was curious to, "nesting grids within grids;" thus allowing me to clear the float and control the parent div's that dont abide by the 12 column standard.
I hope someday this question/answer helps some other fool that refuses to read documentation.
Screenshot 1: https://skitch.com/android86/fm4r7/dreamweaver ( HTML design view)
Screenshot 2: https://skitch.com/android86/fm4fd/dreamweaver ( CSS)
In the screenshot 1, I tried to have the links for website Contact and Login as a part of the Nav tag provided by html 5, however I wanted these to be horizontally next to the hgroup.
I assigned a width to hgroup and now I have a lot of space to the right of hgroup however the nav is starting to line up horizontally, is this something I should handle with position or float property in CSS?
I tried both in various combinations, I assigned a width to nav in order to fit in the area however it doesn't seems to be working. Any clue?
The CSS code is in screenshot 2. After looking at a previous discussion here I thought using class might not be required instead rather parent child relation might be most relevant. I personally thought and read that one should use id's in CSS when it is a very unique scenario and class when we expect to use a certain thing very commonly, is this parent child relation a way of declaring a class? Thanks everyone.
It can be handled by floating both elements left and removing all fixed widths. Here is the amended jsFiddle: http://jsfiddle.net/joshnh/jdUWt/