Does Google Chrome have a strange way of interpreting CSS?

Almost done with my website and it looks great on Firefox and IE 8, but Chrome is causing issues.

Here's how it appears on FF:

And here's Chrome:

Notice how Chrome resizes the first image even though the code is the same as the one below?

Check out the HTML code:

<table id="todo" class="subview_table web_coding_table">
<tr>
    <td>
        <img src="image/preview_small/todo.jpg" alt="ToDo-App" />
    </td>
    <td>
        <h2>ToDo Web Application</h2>
        <p>Simple task planner app for creating,
editing, and deleting tasks. </p>
    </td>
    <td>
    <div class="white_triangle">&nbsp;</div>
    </td>
 </tr>
</table>

<div id="todo_content" class="invisible_content web_coding_content">
 <p>The ToDo web application was created as a semester project with my team colleague ---. The challenge here was complex, class-based programming using JavaScript. The app stores tasks based on cookies and can be used locally from the computer.</p>
 <a href="http://www.hs-augsburg.de/~cr/todo_app/" target="_blank" title:"ToDo-App"><img src="image/preview_big/todo.jpg" alt="ToDo Screenshot"/></a>
 <a class="big_link" href="http://www.hs-augsburg.de/~cr/todo_app/" target="_blank" title:"ToDo-App">Live Demo</a>

<table id="resi" class="subview_table web_coding_table">
<tr>
    <td>
        <img src="image/preview_small/resi.jpg" alt="Resi brings beer" />
    </td>
    <td>
        <h2>Resi Brings Beer</h2>
        <p>Beverage night delivery service in Munich with shop system.</p>
    </td>
    <td>
    <div class="white_triangle">&nbsp;</div>
    </td>
 </tr>
</table>

<div id="resi_content" class="invisible_content web_coding_content">
 <p>NOTE: The client of this project is still working on the website and its contents, so the appearance may not completely represent my original work.</p><br />
 <p>Resi Brings Beer is a website for a night deliverer in Munich. It was implemented with Wordpress and uses various plugins as well as a custom theme. Additionally, there is the use of custom JavaScript code and various PHP code modifications.<p>
 <a href="http://www.resibringtbier.de" target="_blank" title:"Resi Brings Beer"><img src="image/preview_big/resi.jpg" alt="Resi"/></a>
 <a class="big_link" href="http://www.resibringtbier.de" target="_blank" title:"Resi Brings Beer">Visit Website</a>
</div>

Note that DIVs with the class "Invisible_content" are not visible.

Here's the CSS:

table h2 {
font-size:1.5em;
color:#FFFFFF;
font-style: normal;
}

table p {
color:#FFFFFF;
}

.subview_table {
height:120px;
position:relative;
margin:20px 0px 0px 0px;
background-color:#961518;
}

.subview_table h2 {
margin-top:0px;
}

.subview_table img {
padding:10px;
margin:0px;
}

.subview_table td {
min-width:70px;
}

.white_triangle {
position:absolute;
top:60px;
right:20px;
height:0;
width:0;
border-color: #FFFFFF transparent transparent transparent;
border-style: solid;
border-width: 15px;
}

.invisible_content {
display:none;
padding: 20px;
background-color:#d8d5c6;
}

Thanks for any assistance!

Answer №1

Question: Is Google Chrome misinterpreting CSS?

This assumption is incorrect. If your code does not adhere to proper standards, the browser is left to make assumptions about your intentions. The root cause of the issue lies in having invalid and malformed code, rather than a fault with Chrome.

  • It appears that you have used

    <a href="http://www.resibringtbier.de" target="_blank" title:"Resi Bringt Bier">
    , where the correct format for HTML should be title="Resi Bringt Bier". This mistake has been repeated multiple times.

  • You may have also forgotten to close the tag </div> after <div id="todo_content". (This depends on which version of the original post you are referring to.)

  • Regarding your complaint about image size, there seems to be no indication in the HTML or CSS specifying the size for rendering the image, nor can we determine its native size.

  • Placing a div within a td cell is not considered good practice.

  • Review your CSS techniques carefully as they lack many sizing specifications. Leaving tables to figure out their own widths can lead to unpredictability. It's recommended to specify the width of each td in HTML and/or CSS.

http://jsfiddle.net/t2cFb/2/


Validate your HTML using the W3C online validator tool and address all errors found.

http://validator.w3.org/

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Utilizing the :before pseudo-element in input fields

I'm looking to insert some additional content before the first input field in the provided HTML markup without making any changes to the existing structure. I want to achieve this using the :before pseudo-element. Although I've attempted to do s ...

Align Bootstrap 4 dropdowns with their parent element

Is there a way to match the width of a bootstrap dropdown menu with its parent input group? <div id="ddl_1" class="input-group"> <input type="text" class="form-control "> <div class="input ...

Top tips for utilizing CSS in a web component library to support various themes

Our team is currently in the process of developing a comprehensive design system that will be utilized across multiple projects for two distinct products. Each product operates with its own unique brand styleguide which utilizes design tokens, such as: Th ...

Tips on creating adaptable images for mobile viewing

My coding conundrum involves the use of two columns - one for an image and the other for a description of that image. However, when viewing my site on mobile devices, the image is cut off at only half its height. Adjusting both columns to col-sm-6 results ...

Creating an arrow icon alongside a pseudo:hover::before element

This is my custom code snippet: .privacycheck1 { position: relative; top: 265px; background-color: #CF0000; width: 24px; height: 24px; left: 843px; border-radius: 50px; border: 5px #E60000; } .privacycheck1::before { position: relative ...

Experiencing problem with hover:after effect on Internet Explorer 8

I've been working on incorporating the CSS effect found on this website: Everything seems to be functioning properly except for the fix provided for IE8. I added some conditional code so that the fix is only applied to <= IE8, and as a result didn ...

Google Chrome Content Script: Unable to Trigger Dynamically Added Button

In my project, the custom Google Chrome Extension content script is designed to receive a message from popup.html through the Google Chrome Message Passing API once a user logs in using popup.html. This content script is responsible for dynamically adding ...

Achieving Perfect Alignment of Images Using HTML and CSS

I am currently working on designing a HTML/CSS layout for a Kiosk-style website. However, I am encountering some challenges in getting the alignment of images and text to appear exactly as desired. The goal is to have the logo and header remain fixed in ...

Having trouble with debugging Chrome on your react-native device? It seems like the runtime is not quite ready for debugging

Seeking assistance with troubleshooting Chrome debug issues on a mobile device. The Chrome debugger is functioning properly when debugging an iOS simulator. The Chrome debug feature for iOS devices was operational for over a month until it suddenly stoppe ...

When updating the HTML content, JavaScript is outputting the code as text instead of running it

I am encountering an issue with adding the body content of a JSON file, which contains HTML code, to my existing HTML. Instead of executing the code, it appears as text within paragraph or header elements. I have searched through various discussions but ha ...

What is the best way to stack several elements on top of each other?

<div class="parent"> <div class="child" id="child-A"> <div class="child" id="child-B"> <div class="child" id="child-C"> </div> The main concept here ...

Displaying information in a drop-down list based on the selection made in a previous drop

Hey fellow developers, I could really use your expertise on a project I'm working on for attendance management. I've hit a roadblock with a specific feature - my goal is to dynamically display departments based on the selected block without requi ...

Is there a method to style the parent DIV using CSS when the IDs of the child DIVs are

Similar Question: Looking for a CSS parent selector? If I am unable to modify the HTML file, is it possible to apply CSS styles to the parent DIV using only the ID of the direct child DIV? Here's an example scenario: <div> <div id="c ...

Automatically close an element when you click on a different element

Hello everyone! I need some help again. I'm working on a script that displays an overlay when a menu item is clicked. Within this menu, there is a modal contact form with a close icon or anchor that should appear when clicked. My goal is to have the o ...

Is there an optimal method for transforming HTML to PostScript in Java?

Is there an optimal method in Java to convert HTML with CSS2 support into a PostScript file? ...

Discovering the x path of an element becomes a bit more challenging when working with a python selenium script that triggers a button to open a new window where the element resides

Encountering an issue with my Python script using selenium where it fails when a new Chrome window opens after clicking a button. I have manually extracted the x-path of the element from the new window and passed it in my script, but it still gives me an e ...

Ensure that grid rows occupy the least amount of space possible

I'm relatively new to grid layout and I've encountered a challenge that has me stuck. Here's what I have so far: codepen And this is the relevant part of the grid: grid-template: 'img date' 'img head' 'img s ...

What is the best way to call a JavaScript function within a PHP echo statement that outputs a <div> element?

Having trouble echoing this PHP code due to issues with single quotes, causing the HTML to end prematurely. Any suggestions on how to fix this? function button($conn){ $sql = "SELECT * FROM table"; $result= mysqli_query($conn, $sql); while($r ...

Unable to get the splash screen to display at 100% height using CSS

Here is an example of a splash screen I have created. HTML <div id="spalsh"> <span> <img src="{% static 'dbexplorer/img/loading.gif' %}" style="height: 100px;" > </span> </div> CSS #spalsh{ width: 98%; ...

Converting coordinates to pixel-based fixed positioning in CSS

After creating an animated square pie chart using basic CSS to display it in a grid format, I am now looking to transform the larger squares into a state map grid. Any ideas on how to achieve this? In my JavaScript code snippet below, I believe there is a ...