how do I create a totally different header in a mobile media query? I want to omit some elements from the header that were in the full sized version - mobile

I have an element in my header of the full sized version of my webpage. However, in the mobile version I want to omit this element and keep the navigation li's centered.
How can I achieve this?
When I put display:none on the element I want to omit, it still behaves as though the elemennt is there, but just not displaying

Related

react-data-grid: Sortable column header. What dictates which side of the text does the sort icon render on?

I've built out a react data grid. I've added the sortable optional feature and on my system is working with the sort icon(s) rendering to the right of the header text, which is how I'd prefer it.
Others in my group have pulled my code when they run it the sort icon is rendered to the left of the header text (I'm assuming somehow inserting the pull-left style to the icon span).
I can find no information that outlines how exactly this can be controlled, or why it would work differently from one system another.
Hopefully someone is still using this component that can shed some light on this.
You should be able to target the icon and override with CSS. If you inspect the element in Dev tools, it will tell you the classname of the icon. Use CSS to move its position.

Cannot change header row height of ng grid

I need to dynamically change the header row height of an ng grid, depending on which column headers need to be displayed. Some columns have a very long header and I want the column name to wrap so they don't need to be excessively wide. I also don't want a lot of blank space if I initially set a tall header height, but then don't need the space if those long column names aren't displayed.
The issue is I cannot get the headerRowHeight to dynamically change. It took some time to realize that I cannot even initialize headerRowHeight using a scope variable the same way as the other gridOptions (see line 23).
See plnkr
The reason this doesn't work is that ng-grid uses absolute positioning under the hood. Grid Options are only fired once, and then the heights are set in the html after that using style= on the html dom node. (THIS IS AWFUL!) They even set the style manually on all of the underlying header dom nodes.
The other avenue I thought of was trying to redraw the grid using ngGridLayoutPlugin. I played around with this for 30 minutes with no luck. You could try manually redrawing the page itself. It looks like ng-grid is not very good at redrawing the grid, and they've made optimizations specifically for updating data, but not the styles.
The 3.0 beta unstable release looks like they've made a lot of changes, and you'll be able to do what you're trying to do easier... however, it is not ready for production. See the header cell class conditionals in this example: http://ui-grid.info/docs/#/tutorial/115_headerCellClass
I had a hell of a time trying to get ng-grid styling to do my bidding at my last job. At a certain point, we were ready to toss it because it was too restrictive. Good luck.
Use this in your CSS.
.ui-grid-header-cell-primary-focus {
line-height: 2.428571;
}

Scrollbar Removal

I can't figure out how to remove the scroll bar from my website.
I've looked up ways of doing it on SO but with no luck. It just keeps staying in the box.
I also want to be scrollable but just without the actual scroll bar visible from computers.
(It's not visible via mobile devices which is okay)
Regards,
Alex
There is no standard cross-browser CSS code you can use to render scroll bars invisible. However, you can put your <div id="shoutbox_data"> element inside another <div> element with an id field like "shoutbox_wrapper", set the CSS overflow property of the wrapper element to hidden, and then use JavaScript to automatically resize the wrapper element so it covers up the scrollbox. The idea comes from Jan Bilek, and you can find the JavaScript to accomplish this on his blog.

IE display with absolute positioned div

I'm having a display problem with an absolute positioned div in IE6 + IE7
I'm trying to display a drop down menu. this drop down menu is positioned absolute.
now as soon as there's another element below this menu that has position: relative, the absolute positioned drop down menu is displayed behind it.
this only happens in IE7 and 6 as mentioned above.
any ideas on how to fix this?
The css property z-index is there to let you define what object should be displayed "on top". Define z-indexes for all elements in quest (only drop-down should also work I think).
EDIT (based on provided code):
The element to give the z-index property to is "the topmost element with a position attribute that the overlapped div is not part of. In terms of your sample, give the z-index to menu_container or add it to header and give header position: relative (I like the latter option better because it is less likely to break with future changes of your html).
As for an explanation why this is so, in IE6 and IE7 things work as follows: currently absolute_div is above everything inside menu_container, but menu_container is below relative_div, so absolute_div is too. The reason that header doesn't participate in this story is that if no position attribute is given, what is displayed in front and what is in the back is calculated differently.

z-index issue in IE7

I am trying to call one div on click of select element. there are 4 select elements two in each row. When that div is called it goes behind the succesive select element. This issue is specific to IE7. It works fine with IE8 and firefox3.
please can anybody help...
Thanks,
You can read the following link for a detailed info
How the Z-index Attribute Works for HTML Elements
There are two work around for this.
The first is to hide the select element when the div appears. This might not be a good solution.
The other better solutions is to place an iframe at the same position as that of the div.
The iFrame must be added at the end of the page so that it appears in front of all other windowed controls (the windowed controls are stacked in the order in which they appear on the page). That takes care of covering any SELECT that may be in our way.
You can have a look at the code in the page
Bug Fix: SELECT box displayed through Dynamic DIV in Internet Explorer

Resources