How to create item detail view with css
Tags: html,css
Problem :
Htllo,
I have a specific div-tree:
<div class="item-detail">
<div class="title">
TITLE
</div>
<div class="info">
<h1>LOREM IPSUM</h1>
Lorem ipsum
</div>
<div class="links">
<div class="drop-down">
<div class="title">LOREM</div>
<div class="item">lorem</div>
<div class="item">lorem</div>
</div>
<div class="drop-down">
<div class="title">LOREM</div>
<div class="item">lorem</div>
<div class="item">lorem</div>
</div>
<div class="drop-down">
<div class="title">LOREM</div>
<div class="item">lorem</div>
<div class="item">lorem</div>
</div>
</div>
</div>
I am trying to make a css-style for that div, which will look like:
But i have no idea how should i start. Could you briefly tell me how to handle that or maybe give a short example of stuff like that?
Thanks
Solution :
You should rewrite your HTML a bit. Like this:
<div class="item-detail">
<div class="title">
TITLE
</div>
<div class="info">
<h1>LOREM IPSUM</h1>
<p>Lorem ipsum</p>
</div>
<div class="links">
<select class="dropdown">
<option value="title">LOREM</option>
<option value="item">lorem</option>
<option value="item">lorem</option>
</select>
<select class="dropdown">
<option value="title">LOREM</option>
<option value="item">lorem</option>
<option value="item">lorem</option>
</select>
<select class="dropdown">
<option value="title">LOREM</option>
<option value="item">lorem</option>
<option value="item">lorem</option>
</select>
</div>
</div>
In the CSS you should use floats to align the columns, something like this:
.text, .links {
float: left;
}
.text {
width: 70%;
}
.links {
width: 30%;
}
.dropdown {
width: 100%;
}
JSFIDDLE: http://jsfiddle.net/UU6Xp/
CSS Howto..
You are hiding your navigation at 700px (not 600px as stated in your question). If you dont want it to be hidden, remove this CSS from your media query :...
You can remove all the CSS rules containing :hover using Javascript. This should work on pretty much any touch device. var touch = 'ontouchstart' in document.documentElement || (navigator.MaxTouchPoints > 0)...
Depending on what you want, a simple position: relative could do the trick. .logo{ position: relative; top: -20px; /* This will move it 20px up */ left: 20px; /* This...
You can try : label[for=ctl00_cphMainContent_tbFirstName] ~ .knx-field-error { /* Styles for first example. */ } label[for=ctl00_cphMainContent_tbLastName] ~ .knx-field-error { /* Styles for second example. */ } Just learn some CSS...
The .show() will set your element to be display: block; instead of display: inline-block; as you intend.. so to do this, you can instead do .css({display: 'inline-block'});
I have two images [...] what I want is that one of the objects start moving from left side and the other start moving from the right and meet...
Change your css to: #option_button small { display: block; } ...
You have width: 92%; in there which would give you a border. Change that to 100% and use overflow:hidden elsewhere to handle the scrollbar problem.
Add the following css and you should get a fullscreen hover on the center div. #container-center:hover { width: 100%; left: 0; right: 0; z-index: 5; } Don't forget to add...
https://jsfiddle.net/rL89L4uo/2/ .leftlist{ list-style-type: none; } .leftlist li{ padding-left:44px; border-bottom: 1px #621a4b solid; color: #621a4b; position:relative; text-transform: uppercase; margin-bottom: 25px; } .leftlist li:before{ content: ""; background: #621a4b; position: absolute; left: 0px;...
You can use jQuery: $(document).ready(function(){ $("label").each(function(){ var labelValue = $(this).text(); if(labelValue.includes("*")){ $(this).addClass("required"); $(this).text(labelValue.replace("*","")); } }); }); and css: .evrplus_regform label.required:after{ content:"*"; color:red; } Try it yourself here. Pure css...
Sadly I think this is impossible. Each character in a font has a specific shape. In addition, similar characters in different weights weights are also distinct—a bold character does not...
That has nothing to do with Wordpess. It simply is using anchors to take you down or up the page. If an element on the page has a unique id,...
#header html, #header body, #header div, #header span, #header applet, #header object, #header iframe ... etc etc. As beejamin has pointed out you need to thin down your CSS it...
Use margin to position your div #2 rather than position: fixed.
Nokia N78 uses the S60 browser, which reads only "screen" stylesheets. It won't read the "handheld". It doesn't support media query. Instead of trying to type everything here, have a...
Use vw for font-size. h1{ font-size : 7.5vw; } p{ font-size : 2vw; } Demo is here....
Have a look here for a super-simple solution. http://learnlayout.com/inline-block.html
The solution can you find here: https://css-tricks.com/how-nth-child-works/ In your situation, I think you need is :nth:child(7n+5){ } Explanation: 7n are the steps you have to set, 5 is the starting...
You'll need two <ul>s, one with float:left and the other with float:right. That should do it.
Ok its been a while but the answer might help someone. Like I said in the question I was required to make it work only in IE. . It works...
What's happening is that with fixed content, you need to declare a z-index if you want it to stay on top of any content below it. It seems like the...
You can use the developer tool's in the browser to view the code in detail and even make a few CSS/HTML changes to see how this change would look in...
You need to remove your float:left property from your pac man class, and add a text-align:center to your wrapper class. Text-align; This property describes how inline-level content of a block...
I have an idea : here it is Even though you put border-radius :50%; the image on which you make the hover effect still doesn't get border-radius, it only gets...
Option 1 When doing email styling, keep the styles inline. While CSS is supported by many email clients today, the best way to prevent them from interfering with the rest...
You want to use div.footermenu li.expanded > a:first-child jsFiddle http://jsfiddle.net/eRTV6/ div.footermenu li.expanded > a:first-child { font-weight: bold; } Your original selector will select all anchor elements which are first-children of...
Here's some CSS to to display a list in columns. ul { display: block; margin: 0; padding: 0; } li { display: block; float: left; width: 24%; /* 24% will...
You need to add the below CSS properties to li:before font-size: 128px; vertical-align: middle; You can change the 128px to any size you want. Demo...
You answer here is the wonderful world of body classes. You would apply a class to each page, for the home page you could use: <body class="homePage"> for other pages,...