Html Grid Using Ul li [closed] - html

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 need a help. Plz see the attached image. I am trying to make grid using html ul li with any height. I am trying to put column one after another without any white space in between . But unfortunately 4th column is going bottom. How to fix ?
ul.brik{
margin-left:-5px;
}
ul.brik li{
display:inline-block;
width:32.5%;
margin-left:5px;
vertical-align:top;
}

Assuming you don't mind ordering your columns vertically instead of horizontally, and you don't need this to work in older browsers:
display: flex;
flex-flow: column wrap;
With possibly some other flexbox properties should get you that layout.

This is happening because each ul appears at the top of the line it is currently in. Once a line break is introduced, the next ul will appear where you see it.
To solve this, separate each column by a div, and put the uls inside.
You'll need to set the display of the divs to inline-block for them to stack horizontally.

i'm not quite sure what it is you're looking for. it looks like you separate them with more divs, also i think for your purposes you can add a
min-height:50px;
max-height:250px
overflow:hidden;
/* you could also try*/
position:absolute;
top:20px;
left:20px;

Related

Making a nav bar even in CSS/HTML [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
so I'm trying to get my nav bar to basically, look nicer, I've designed it mostly how I want it in CSS, but each link is the size according to it's word size, so each block/link is sized differently (hope that makes sense) so I'm wanting to make them all the same size not/not dependent on word length. I'm also wanting to change the color behind the links (basically make it so the color stretches to the sides) I included a link to a picture explaining what I'm talking about: http://postimg.org/image/mdoq7vwy7/ . Thanks in advance!
You'll want to use flexbox. Flexbox can make all the item the same size regardless of the content.
JSFiddle
ul{
display:-webkit-box;
display:-webkit-flex;
display:-ms-flexbox;
display:flex;
list-style-type:none;
}
ul li{
-webkit-box-flex:1;
-webkit-flex:1;
-ms-flex:1;
flex:1;
text-align:center;
}
PS. It's hard to give you help without you providing any code
To make each link in the navbar the same width, give them all the same class and do this css:
.list-class { width: 100px; }
And to make the color stretch past the margins, I would try this:
li { padding-left: 5px; padding-right: 5px }
Assuming you are using lists for your navbar. It's a little hard to help without the code but hopefully this helped

Buttons and input fields not responding to mouse events [closed]

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 this html and css code. http://jsfiddle.net/Pp9Z6/
I can't figure out why I'm not able to click inside the EditText and Button widgets.
If you right-click the edit, and choose 'inspect element', you know why. The element that you're inspecting turns out to be a div. It's because div 'main-nav' is an overlay over almost the entire page.
And that is due to this CSS:
div {
position:absolute; height:100%; width:100%;
display: table;
}
You could solve it by adding z-index: -1; to that CSS, but the real question is why that div is there in the first place. There's probably a better way to align your main navigation. Actually, it seems to work just fine (or at least the same) when I remove that entire CSS definition: http://jsfiddle.net/Pp9Z6/2/
remove height:100% rule form your div style. It is overlapping your entire page.
You have a gigantic div that keeps you from clicking the input, or the button... I strongly advise your to review you page layout, but if you want to solve this praticular problem, wrap the login area to a div, and set its position to relative. It will get in front of the #main-nav
http://jsfiddle.net/Pp9Z6/3/
div {
position:absolute; height:100%; width:100%;
display: table;
}
above div Overlapping the rest of the content. so u can't access element
just remove position:absolute; and see it will work or modify the code as below
div {
position:absolute; height:100%; width:100%;
display: table;
z-index:-1;
}

center align a resizing, absolute div [closed]

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 have a page set up however I am having trouble aligning the news articles to the center of the page.
Here is a link to what I have so far -
http://casb1.cloudapp.net/1016/1be61016ff9a717aa34c2adf7c5aa79e/3D%20Design/news%20articles/news.html
Basically I need the red area to always be the same distance from the edges, even when it expands. Is this possible?
The red container has the css of position:absolute
Any help would be hugely appreciated.
PS. this is only my first week of learning css and html so please forgive me if it is something simple.
Thanks
I think you don't need the position:absolute you can delete this property and add this:
.collection {
display:table;
margin:auto;
}
There's a lot that can be impoved, but going to your question, I'd do something like this:
.collection {
position: static;
display: inline-block;
}
.roundcont {
text-align: center;
}
You basically need to remove the position: absolute; attribute from your .collection element and change its display to inline or inline-block and then set text-align center; to its parent div so now it looks centered.

CSS Issue. Some text doesn't seem to have the same padding as the rest [closed]

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
Here is a CodePen example: http://cdpn.io/wlEpA
As you can see, all of the texts line height is different, even though each element has the same CSS.
Is this an issue with the font?
The text should all be the on the same line.
Edit: 2 people have said this post is not clear or useful, at least explain why so I can make it more clear, your vote on my post is also not clear or useful.
The issue is the padding: 50% 0; style on the .ml elements. 50% is a relative value. Those elements currently vary in width, depending on the size of their content, and that affects how the padding is calculated.
Specify a width or min-width for the .ml elements and they will line up correctly. Here is your CodePen example, with min-width: 100px; added: http://codepen.io/anon/pen/mbsnH
One solution, is to set the line-height on the .mi css class.
.mi {
float:left;
cursor:pointer;
border-top:#222222 4px solid;
margin:0em 1em;
height:90%;
line-height:85px;
}
Example: http://jsfiddle.net/NerLZ/1/
i.e. to make it the same height as the .menu class.
(If I've understood the problem correctly).
Martyn, you have display:inline-block on your links, and you have float:left on your divs. That's redundant. And inline-block creates margin inconsistencies. Turn off inline-block and that will fix your problem.

Table cell like view for HTML list [closed]

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.