Change Div Size |
Change Div Size |
FrostTaco |
May 4 2016, 05:46 PM
Post
#21
|
Member Group: Members Posts: 47 Joined: 26-April 16 Member No.: 24,193 |
I see them now but they are itsy bitsy. The size doesn't take for some reason. But as sais, that DIV is the height you want it to be in the browsers I've checked in. Have you tried taking out the display: inline; Also, the pictures are staying to the left, when their supposed to be centered, and when i try(with display:inline; in it), its 130 pixels no matter what i change the height to. This post has been edited by FrostTaco: May 4 2016, 05:53 PM |
FrostTaco |
May 8 2016, 06:15 PM
Post
#22
|
Member Group: Members Posts: 47 Joined: 26-April 16 Member No.: 24,193 |
Any help?
EDIT: I just changed the code alot so my css looks like this: CODE input.zoomin { And i removed the entire div, all I need now is the images(inputs) centered.border-radius: 10px; border: 2px solid gray; height: 100px; width: 100px; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -ms-transition: all 1s ease; transition: all 1s ease; } input.zoomin:hover { width: 150px; height: 150px; } CODE <div class="header" align="center"> Dont know why they arent centered?<ul> <li> <input type="image" src="images/giveaways/main/MirrorMoonEP.jpg" alt="Submit" onClick="parent.location='giveaway.php?id=MGEw0/'" data-toggle="tooltip" title="Mirror Moon EP And Starwars" class="zoomin"> </li> <li> <input type="image" src="images/giveaways/main/AvoidSensoryOverload.jpg" alt="Submit" onClick="parent.location='giveaway.php?id=UTkmH/'" data-toggle="tooltip" title="MirrorMoon EP, OutCast 1.1, Avoid Sensory Overload" class="zoomin"> </li> </ul> This post has been edited by FrostTaco: May 8 2016, 06:54 PM |
pandy |
May 8 2016, 07:50 PM
Post
#23
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
I don't know what I should paste together with what anymore.
|
FrostTaco |
May 9 2016, 03:59 PM
Post
#24
|
Member Group: Members Posts: 47 Joined: 26-April 16 Member No.: 24,193 |
|
Frederiek |
May 9 2016, 04:08 PM
Post
#25
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
Centering can be done with margin: 0 auto;
|
pandy |
May 9 2016, 08:29 PM
Post
#26
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Can't you just link to the page?
|
FrostTaco |
May 9 2016, 08:50 PM
Post
#27
|
Member Group: Members Posts: 47 Joined: 26-April 16 Member No.: 24,193 |
Can't you just link to the page? http://corndog.corticalcafe.com/index.php I apologize if the page is different at all from what I posted, just been trying to fix it(I don't think I've changed it since i last posted). |
FrostTaco |
May 10 2016, 06:35 PM
Post
#28
|
Member Group: Members Posts: 47 Joined: 26-April 16 Member No.: 24,193 |
Any help?
|
Frederiek |
May 11 2016, 04:04 PM
Post
#29
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
The UL doesn't have a width specified, so is 100% of the window.
Instead of using the attribute align="center" on the .header div, set a width to the CSS of that div. You already set the margin to "0 auto" to center it. Only then, your donate button will decrease in size. I'm not sure if you still have this problem with the div height size? I don't see any reference to a height of a div in the page. I think it is no longer relevant. Or is it? |
FrostTaco |
May 11 2016, 04:59 PM
Post
#30
|
Member Group: Members Posts: 47 Joined: 26-April 16 Member No.: 24,193 |
The UL doesn't have a width specified, so is 100% of the window. Instead of using the attribute align="center" on the .header div, set a width to the CSS of that div. You already set the margin to "0 auto" to center it. Only then, your donate button will decrease in size. I'm not sure if you still have this problem with the div height size? I don't see any reference to a height of a div in the page. I think it is no longer relevant. Or is it? Sorry if I didnt post this already, but I took out the div that made it way to tall, and now its right sized. Also, what you said made everything move to the left... |
Frederiek |
May 12 2016, 03:03 AM
Post
#31
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
All CSS declarations for #body div.header (line 342) are crossed out when inspecting the element. The declarations for #body.home div.header (line 155) are taken in account instead.
Seems like a specificity issue to me. https://css-tricks.com/specifics-on-css-specificity/ https://www.smashingmagazine.com/2007/07/cs...ou-should-know/ https://stuffandnonsense.co.uk/archives/css...icity_wars.html (seems like an archived page, no styling, but still accurate in content) But you still need to set a width other than 100% to div.header for the margin centering to work. |
FrostTaco |
May 12 2016, 06:27 AM
Post
#32
|
Member Group: Members Posts: 47 Joined: 26-April 16 Member No.: 24,193 |
All CSS declarations for #body div.header (line 342) are crossed out when inspecting the element. The declarations for #body.home div.header (line 155) are taken in account instead. Seems like a specificity issue to me. https://css-tricks.com/specifics-on-css-specificity/ https://www.smashingmagazine.com/2007/07/cs...ou-should-know/ https://stuffandnonsense.co.uk/archives/css...icity_wars.html (seems like an archived page, no styling, but still accurate in content) But you still need to set a width other than 100% to div.header for the margin centering to work. Ok thanks, I'm using a template I got which came with its css code, no clue what it was using EDIT: Changing the width moved everything inwards, but centered nothing. Trying out text align. Another edit nope, text align wont work. Also, I just realized that it is using the css its supposed to, the normal header was for something higher in the page. This post has been edited by FrostTaco: May 12 2016, 06:44 AM |
Frederiek |
May 12 2016, 11:30 AM
Post
#33
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
text-align: center; does work for the text in .header.
Now there's only one input element left in the UL list, so the float on LI no longer makes sense. I commented the float on #body div ul li (line 470 of styles.css) and changed the margin from 0 10px; to 0 auto; and that centered that too. I'm not sure why you use a list for just one LI. And even less why you use an input element just to show an image. Besides, the image is distorted at the given size of 100 x 100px (set on input.zoomin), as its original size is 460 x 215px. Are you sure you want it to look like it does? BTW, what did the template look like? URL? Did you change much of it? This post has been edited by Frederiek: May 12 2016, 11:32 AM |
FrostTaco |
May 12 2016, 03:11 PM
Post
#34
|
Member Group: Members Posts: 47 Joined: 26-April 16 Member No.: 24,193 |
text-align: center; does work for the text in .header. Now there's only one input element left in the UL list, so the float on LI no longer makes sense. I commented the float on #body div ul li (line 470 of styles.css) and changed the margin from 0 10px; to 0 auto; and that centered that too. I'm not sure why you use a list for just one LI. And even less why you use an input element just to show an image. Besides, the image is distorted at the given size of 100 x 100px (set on input.zoomin), as its original size is 460 x 215px. Are you sure you want it to look like it does? BTW, what did the template look like? URL? Did you change much of it? I use a list as I am constantly adding and taking away inputs. The original was https://freewebsitetemplates.com/preview/fr...shop/index.html The image distortion is fine. I use input as, the images are working as buttons, some of them will go to a link, others will do other things. I'm so dumb, I took out line 470 and it works. Dang templates. Thanks alot, problem solved for now! EDIT: Problem not solved, if I put multiple items in the list, they stack, instead of going next to each other. This post has been edited by FrostTaco: May 12 2016, 03:12 PM |
Frederiek |
May 13 2016, 02:26 AM
Post
#35
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
A link around each image, instead of using an input, would have the same effect. But, oh well.
Anyway, set the LI (line 469) to display: inline-block; and there you go. You can now leave out the margin there. |
FrostTaco |
May 13 2016, 07:01 AM
Post
#36
|
Member Group: Members Posts: 47 Joined: 26-April 16 Member No.: 24,193 |
A link around each image, instead of using an input, would have the same effect. But, oh well. Anyway, set the LI (line 469) to display: inline-block; and there you go. You can now leave out the margin there. Thanks alot, it now works with alot of inputs, I did have to take out width: 234; something like that, as it was making them far apart. Thanks again! |
Frederiek |
May 13 2016, 09:03 AM
Post
#37
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
Good. You're welcome.
When you will put in a lot more inputs, you can space them out by using padding, which is currently set to 0 (zero). I suggest you fix the few HTML errors on that page found by the validator: https://validator.w3.org/nu/?doc=http%3A//c...e.com/index.php |
FrostTaco |
May 13 2016, 03:02 PM
Post
#38
|
Member Group: Members Posts: 47 Joined: 26-April 16 Member No.: 24,193 |
Good. You're welcome. When you will put in a lot more inputs, you can space them out by using padding, which is currently set to 0 (zero). I suggest you fix the few HTML errors on that page found by the validator: https://validator.w3.org/nu/?doc=http%3A//c...e.com/index.php Thanks, will try fixing those |
Frederiek |
May 13 2016, 04:34 PM
Post
#39
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
If you have any question about that, just ask here.
|
Lo-Fi Version | Time is now: 19th April 2024 - 03:00 PM |