473,651 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Header elements wont reset after page has been resized in Safari

1 New Member
I’ve got this header made up of a nav element and a heading element containing an inline image and words. I chose to place the words into spans in order to target them individually with media queries. Here is a link to the header. http://noahenart.com/header/

When I resize my browser to test the responsiveness everything works according to plan, the problem occurs when I resize it back (From smaller to larger). Elements don't go back to their former positions (unless I refresh the page). This becomes a problem especially when using a mobile device and changing orientation.

I’ve tried different things including having the image on a separate heading, the lot enclosed in an hgroup but that didn’t work out either. Any ideas how I can fix this?

Expand|Select|Wrap|Line Numbers
  1. <header class="top">
  2. <div class="mast">  
  3.  
  4.     <h1 title="Hawaii Media Grant">
  5.         <a href="#">
  6.             <img id="logoi" src="img/logo_h.png" alt="Hawaii Media Grant logo">
  7.             <span id="logos">HAWAII</span>
  8.             <span id="logob">MEDIA</span>
  9.             <span id="logom">GRANT</span>
  10.         </a>
  11.     </h1>
  12.  
  13.     <nav>
  14.         <ul>
  15.             <li><a href="#" title="About">About</a></li>
  16.             <li><a href="#" title="Work">Work</a></li>
  17.             <li><a href="#" title="Blog">Blog</a></li>
  18.             <li><a href="#" title="Contact">Contact</a></li>
  19.         </ul>
  20.     </nav>
  21.  
  22. </div>
  23. </header>
Expand|Select|Wrap|Line Numbers
  1. header h1 { 
  2. font-size: 1em; 
  3. text-transform: uppercase; 
  4. line-height: 1.1875em; 
  5. font-weight: normal; 
  6. font-style: normal;
  7. float: left; 
  8. margin: 0 0 0 1%; 
  9. position: relative;}
  10.  
  11. header h1 img { 
  12. float: left; 
  13. position: relative; 
  14. bottom:30px; right: 10px;} 
  15.  
  16. header h1 a { 
  17. color: #000; 
  18. font-family: "nevisBold","nevis", "Helvetica neue", Arial,sans-serif; 
  19. font-size: 2.2em; 
  20. padding: 0;}
  21.  
  22. header h1 a span#logos,
  23. header h1 a span#logob,
  24. header h1 a span#logom { 
  25. display: inline;}
  26.  
  27. a {
  28. background: transparent; 
  29. color: #bababa;
  30. font-size: 100%; 
  31. margin: 0; padding: 0;
  32. text-decoration: none;
  33. vertical-align: baseline; 
  34. -moz-outline: none;}
  35.  
  36. a:focus, 
  37. a:hover, 
  38. a:active {
  39. outline: 0;}
  40.  
  41. ul, ol { 
  42. margin-left: 0; 
  43. padding: 0;  
  44. list-style: none;}
  45.  
  46. header ul {
  47. float: right;
  48. margin: 0;
  49. clear: none;}
  50.  
  51. header li {
  52. display: inline;
  53. margin: 0 0 0 1.5em;}
  54.  
  55. header a {
  56. color: #333;
  57. padding: 0 0 5px 0;}
  58.  
  59. header a:hover {
  60. border-bottom: 6px solid #bababa;
  61. color: #8cc4f5;}
  62.  
  63. header.top {
  64. background: #fff; 
  65. width: 100%;}
  66.  
  67. .mast {
  68. margin: 0 auto;   
  69. overflow: auto;
  70. padding: 5em 0 1.25em 0;
  71. width: 71.830985915492958%; max-width: 1020px;} 
  72.  
  73. @media screen and (max-width: 1195px){
  74. .mast { padding:52px 0 20px 0;}
  75. header h1 { float:none; text-align:center; margin-top:-30px; margin-bottom:; padding-top:; padding-bottom:;}
  76. header h1 img { float:none; bottom:-30px; right: 10px}
  77. header ul { float:none; margin:0.7em auto 1.15em; text-align:center;}}
  78.  
  79. @media screen and (max-width: 769px) {
  80. header h1 { font-size: 0.8em;}
  81. header h1 a img#logoi { bottom: 0; right: 0; margin: 0 0 0.5em 0; width: 8%;}
  82. header h1 a span#logos { display: block !important; margin: 0 0 0.5em 0;}
  83. header ul { margin: 0.7em auto 0;}
  84. header li { margin: 0 0 0 .5em;}}
  85.  
  86. @media screen and (max-width: 480px){
  87. header h1 a { padding-bottom: 0; font-size: 2em;}
  88. header h1 a img#logoi {width: 15%;}
  89. header li { margin: 0 0 0 .4em;}}
  90.  
Apr 27 '12 #1
0 1526

Sign in to post your reply or Sign up for a free account.

Similar topics

6
4738
by: George Hester | last post by:
The reason why I want to do this is that I will set a form's elements to have a tabIndices. I start out with no tabbing. The page loads the cursor appears in a first Input box and until the user "does something" there is no tabbing. This is specific to Microsoft Internet Explorer 5+. Anyway the issue is that although I set the tabbing order for all the components on the "page," there is one "element" that gets included in the tabbing order...
0
1375
by: Chan | last post by:
Hi I am getting the following error when I call a web service method from .Net 2002 Application "One or more header elements marked as mustUnderstand was not understood BUT it works from .Net 2003 application Please let me know why this happens
4
1226
by: kucherls | last post by:
When i inserted the images in the header for the page in access reports, why is just the header not shown on all the pages when the footer does.Is there any property which i need to reset or check on. Can somebody help. Thanks
1
2017
by: sck10 | last post by:
Hello, I have a table with some controls in it, but it is not rapped in a form. I also have a button for reseting the page. When I click the button, the page resets, but I get the following error: "Done, but with errors on the page". I am trying to figure out a way to use JavaScript in my master page that can be used for all my content pages. Any help with this would be appreciated. Thanks, sck10
4
5011
by: sck10 | last post by:
Hello, I have the following in my Master Page that I am using as a redirect template: <head id="headRedirect" runat="server"> <meta id="metaRedirect" http-equiv="Refresh" content="2; URL=http://www.mysite.com/" /> <title>Page Redirect</title> </head>
0
1311
by: R. Tschirley | last post by:
Hi all, I've got some annoying trouble with IE's display of my new website header. On my site, the corporate logo shall be right-aligned: +--------------------------------------------------------------------+ | siteactions . | | | _ _ _ | | |___(_)(_](_) |
3
6858
by: Otto Wyss | last post by:
I'd like to print a page but would exclude all elements but one (a table). I've successfully removed all elements from printing with a print.css @page { size: portrait; margin: 2.5cm 1cm 1.5cm 1.5cm; } * { display: none; } yet that doesn't produce the desired result. How do I include the single
3
1534
by: RathiSarov | last post by:
Hi Friends, I have a master page and a child page with some amount of server controls. The issue is when we resize the page, the controls are not center aligned. I tried adding aligning the tables "center" and the relative position as per some of the old threads on this. But those did not help. Any kind of help will be very much helpful. Thanks, Rathi
1
1883
by: jyothiB | last post by:
Hi I have a datagrid in a webform that has to be printed. So i enclosed it in DIV tags and wrote it to a new html page, and the grid looks fine for printing but the grid spans more than 1 print page, and thats when the datagrid header does not repeat on the second page. Do any of you have a solution for this? I have been searching for this since a long time. Any help will be greatly appreciated. Thank you
1
2448
by: Ben Adams | last post by:
I have a header.php file containing the following code... ... <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title><?php echo $tpTitle ?></title> <meta name="description" content="<?php echo $pgDesc ?>"></meta> <meta name="keywords" content="<?php echo $pgKeywords ?>"></meta>
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8802
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8697
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7297
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.