hr position won't change. |
hr position won't change. |
pandy |
Apr 6 2019, 01:48 AM
Post
#21
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
I don't know what the others are saying, but I'm saying that you won't change the position of the HR with width and height. It will be larger or smaller but it will be in the same place.
I suggested a DIV for training because it doesn't have any special features, as HR has. As an example... HTML <hr id="foo"> ... if you want to move the HR a little upwards, you could use a negative top margin... CODE #foo { margin-top: -10px } ...or you could use position relative. CODE #foo { position: relative; top: -10px } The difference in how this will look is that position: relative will leave a space where the HR originally was. The text after it won't move up. With a negative margin there is no space and the text after the HR will follow it up. |
Christian J |
Apr 6 2019, 04:07 AM
Post
#22
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
I suggested a DIV for training because it doesn't have any special features, as HR has. What are those special features (asking for a friend)? QUOTE As an example... HTML <hr id="foo"> ... if you want to move the HR a little upwards, you could use a negative top margin... Then the HR may even move in front of the element above it, which can be useful sometimes. |
pandy |
Apr 6 2019, 01:13 PM
Post
#23
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Features was maybe a poor choice of word, but a HR has default browser styling that makes it look like a HR, i.e. three dimensional. Borders, more than one shade or whatever is used. Since a div is just an anonymous box it may be easier to fiddle with.
|
Lo-Fi Version | Time is now: 23rd April 2024 - 01:48 AM |