Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

browser behaviour

Featured Replies

hi

 

i would like to display a picture and once clicked i would like it to open in a new window. This works fine for IE, however firefox seems to jiggle the code around. i say this as when i look at it with firebug it moves the target="" to before my href="". il show the sample code below:

 

<li>
<a href="http://www.sforsugar.com" target="_blank">
<img src="images/sforsugarthumb.jpg" alt="SforSugar.com" />
</a>

 

firefox displays as:

 

<a target="_blank" href="http://www.sforsugar.com"><img alt="SforSugar.com" src="images/sforsugarthumb.jpg"></a>

 

is this a known behavioural difference for firefox and would i have to enter another line of code specifically for firefox, or am i doing it incorrectly and cannot see it?

 

many thanks

 

dave

Edited by Renaissance-Design
Please use the code button or tags to format your code.

I think you'll find this is firebug's work, not firefox. If you view source in firefox you should find it's exactly as written in your html file. I've noticed firebug occasionally re-orders elements. It's just firebug trying to be helpful, and it definitely makes no difference to the way your page works.

  • Author

ok thanks. il look into it more why firefox wont accept it then

Can you explain your problem in more detail? What do you mean firefox won't accept it?

  • Author

ie works properly. when u hover over the image you can click and the link will open in the new window as planned.

 

in firefox when i hover over the image nothing happens.

Can you post a link to your page, or the whole html document? Sounds like you may have an unclosed tag or something. Running your page through the W3C validator would show this up.

The reason it's not working is because the <img> is floated inside the <a> causing it to collapse. Just add overflow:auto to the <a> in your stylesheet and it should fix this.

  • Author

ok ive added this to my style sheet as you advised:

 

a { color:#cc7108; outline:none; overflow:auto;}
a:hover{text-decoration:none; }

 

 

still no luck.... :(

Edited by Renaissance-Design
Please use the code button or tags to format your code.

Ahhh, you're right. Wasn't expecting that, but having looked more closely I now see what's the problem (even if I can't figure out how it occurred. Here's how to fix it: float the <h4> and <p> in your <li> like so

 

.list1 li p, .list1 li h4 {
float:left;
width:165px;
}

 

Without being floated, they're sitting in front of the <a> tag. I suppose you might be able to fix this using zindex, but to my mind, this way is better.

  • Author

fantastic thanks alot.

 

so it was the relative positioning that was throwing everything out ?

 

its strange that it would do that for one browser and not another though isnt it ?

 

thanks again

 

dave

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.