Skip to main content
Participating Frequently
April 2, 2018
Answered

css image and div aligning issues in html.

  • April 2, 2018
  • 2 replies
  • 1123 views

When i use Dream Weaver to write code for my website, in the css file it won't respond to any changes that i make to the padding on any of my images. yesterday i saved it and it looked fine but that was because it wasn't actually responding to the padding changes that i made and it made everything i did wrong. i'm still unable to solve this issue. 

This topic has been closed for replies.
Correct answer Jon Fritz

do i take my original div classes links? and place these ones instead ? i'm confused how to do this because when i do it doesn't look right at all.


You would replace your "work" div and contents (designs, photographs and videos containers) with everything from inside the <body> tags of the example code (not including the <body> tags themselves). Then add the example code's css to the end of your stylesheet and delete the css you have for those items as well.

2 replies

B i r n o u
Legend
April 3, 2018

an image is an inline element... so it doesn't have any padding vertically.. at least it doesn't interact with any siblings elements... it just have an horizontal padding... so if you want to add vertical padding to your image, you first will have to cast it to an inline-block, or a block element... depending on the main goal...

then your .wordthird class has some errors in it... you should remove the padding-left and padding-bottom that are negative... negative value are not allowed. The text-decoration should be applied to the anchor element and not to the container

your HTML contains some errors too, your anchor closing tag is above the closing DIV it should be after....

Jon Fritz
Community Expert
Community Expert
April 2, 2018

Negative values are not allowed with CSS padding properties.

Maybe you meant to use negative margins?

Negative margins can be used, but can cause their own problems. What are you trying to do exactly?

Participating Frequently
April 2, 2018

i want to get the image that appears underneath or at the bottom to align next to the image of the girl but i have tried many different ways and it won't go up. any ideas? thanks!

Jon Fritz
Community Expert
Community Expert
April 2, 2018

OK, that shouldn't be too terrible, you just have some code that's conflicting with what you're doing that maybe isn't shown in your post.

Could we see the entire code for the page?