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.

Need help with html and jquery.

Featured Replies

Hi all,

 

Don't judge plse, im still new to this.

Im supposed to make a website for a travel agency (for school ofcourse), but i can't get it done right.

 

Still stuck on the index page, heres my problem.

They asked to divide the website in 3 i did it with 3x float left and adjusting the margin left. however for some reason the height gets stuck where the content stops.i'd like to fix that.

 

Also trying to slideUp some tekst over my images using jquery. Guess im no hero in this.

 

Can anyone help? you can find my codes here.

fotogallerij.html

index.html

onzereizen.html

reistips.html

Style.css

Heyhey mate.

 

How to set same height for columns

 

1) Everytime you float something, you need to clear the float afterwards so the content doesn't collapse.

<div id="midden"></div>
<div id="mid"></div>
<div id="rechts"></div>

<div class="clear"></div>
.clear {
    clear: both;
}

2) Wrap your three divs into another div and make it a table. Give your columns a class and make it as high as the container.

<div class="container">

    <div id="midden" class="column"></div>
    <div id="mid" class="column"></div>
    <div id="rechts" class="column"></div>

    <div class="clear"></div>

</div>


.container {

    display: table;
    margin: 0 auto; /* centers the content */

}


.column {

    display: table-cell;
    height: 100%;

}

I think you mean you want some image caption to appear when you hover over the image.

You don't need jQuery. CSS can do the trick as well. :)

1) Add some text under your image.

<li>

    <img src="..."/>

    <p class="caption">Some text</p>

</li>

2) Set the text above the image and make it visible on hover.

li {
    position: relative;
}

.caption {
    position: absolute;
    bottom: 0;
    opacity: 0;
    transition: .4s ease; /* smooth fade in/out */
}

li:hover .caption {
    opacity: 1;
}
  • Author

High Pascal,

 

Thanks for replying on such short notice. The first post i will try out in a bit. The second post: u assumed right, i want some tekst to fade over the image when i go over it with my mouse, however, iwas instructed to do this with jquery. i have took the jquery course on www.codeschool.com but i can't seem to make it work in my website...

 

So i realy need to use jquery.

 

grtz,

Ibo

  • Author

 

Heyhey mate.

 

How to set same height for columns

 

1) Everytime you float something, you need to clear the float afterwards so the content doesn't collapse.

<div id="midden"></div>
<div id="mid"></div>
<div id="rechts"></div>

<div class="clear"></div>
.clear {
    clear: both;
}

2) Wrap your three divs into another div and make it a table. Give your columns a class and make it as high as the container.

<div class="container">

    <div id="midden" class="column"></div>
    <div id="mid" class="column"></div>
    <div id="rechts" class="column"></div>

    <div class="clear"></div>

</div>


.container {

    display: table;
    margin: 0 auto; /* centers the content */

}


.column {

    display: table-cell;
    height: 100%;

}

I tried doing this, but it doesn't change anything. I also tried to give my <div id="wrapper"> the same backgroundcolors as the left and right div. even that doesnt color the bg??? this is strange, am i overseeing something?

  • Author

I tried doing this, but it doesn't change anything. I also tried to give my <div id="wrapper"> the same backgroundcolors as the left and right div. even that doesnt color the bg??? this is strange, am i overseeing something?

 

Solved the background color problem. it appears in CSS i had #wrapper instead of .wrapper..... i overlooked the dot.

 

However still in search for a solution to slide tekst over my pictures when hovering. And the teacher says it has to be Jquery. plse help.

  • Author

Woops, i thought that the "mark solved" button closed this thread, but instead choose best answer. I've fixed the problem. Got it workig. Still need to fix a few thing, but i'll do that later on the day.

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.