![]() |
any css advice? Hi guys, i went trough my code and possibly I've found the "problem". can anyone give me a tip how to overcome? my code for the two menus is following: HTML Code: <header>my "primary_nav" is at the bottom of the page and I use pure css code to access it. now the problem is: i can't display my menu icons inline (globe and bars) in mobile version of my site (I'm creating responsive website). I think the cause is that I have "nav" on the one hand and no-nav on the other. any clues on how to fix it? |
Re: any css advice? Hi, there are a lot of possibilities, can you provide any live example of that? |
Re: any css advice? You can try display:inline-block to fix it, or you have to fix it in media query Thanks |
Re: any css advice? As Sowkat Hossain said, apply inline-block to the elements that are not displaying that way. If you are not positioning your ul and li, or you are not styling them in a way that will force the position of their links, it can be as simple as: Code: #navigation a, a.to_nav {display:inline-block;}Code: #navigation, #navigation a, #navigation ul, a.to_nav {display:inline-block;}Code: #navigation, #navigation a, #navigation ul, #navigation li, a.to_nav {display:inline-block;}BTW, you can also target those elements from the header tag, like: Code: header a {display:inline-block;}Just a warning: inline-block elements have a blank space between them (as they should), and the easiest way to remove those spaces is to remove any space in your code: Code: <header>Removing spaces in code makes it harder to read/edit, but the less spaces/tabs in your code, the more bits you save and the faster the page loads. One thing for the other. Another option would be to float elements, but that can have more drawbacks. Or what I do, relative/absolute positioning of every element, but it can be harder to do properly, specially in responsive designs. |
Re: any css advice? you may want to check your @media queries to make sure you are not display:none the icons container at whatever breakpoint |
Re: any css advice? Quote:
arojilla Sowkat Hossain did not say any way, he only said the property value. If you thought that your answer is the right you should satisfy with yourself not to refer anyone. It is not politeness. |
Re: any css advice? Quote:
|
Re: any css advice? thanks guys I solved the problem |
| All times are GMT -6. The time now is 04:24 AM. |