Skip to content

Instantly share code, notes, and snippets.

@pjb3
Last active December 20, 2015 17:19
Show Gist options
  • Save pjb3/6168081 to your computer and use it in GitHub Desktop.
Save pjb3/6168081 to your computer and use it in GitHub Desktop.
Why is the inner div underlined?
<html>
<body>
<div style="text-decoration: underline; font-weight: bold">
I am underlined
<div style="text-decoration: none; font-weight: normal">
I am not
</div>
</div>
</body>
</html>
@keekerdc
Copy link

keekerdc commented Aug 6, 2013

context: the WAT is that everything is rendered as underlined.

@benplum
Copy link

benplum commented Aug 6, 2013

Not seeing the issue.. you told everything to be underlined..

@pjb3
Copy link
Author

pjb3 commented Aug 6, 2013

Sorry, bad copy paste, even with none on the inner div, it is still underlined.

@pjb3
Copy link
Author

pjb3 commented Aug 6, 2013

@benplum
Copy link

benplum commented Aug 6, 2013

Wow, super weird. Seems taking it out of the document flow helps: http://jsfiddle.net/SPCKJ/4/

@heyitsgarrett
Copy link

Even weirder, coloring persists in the line: http://bl.ocks.org/heyitsgarrett/edf088a30ceeae50eafb

@marchdoe
Copy link

marchdoe commented Aug 7, 2013

@heyitsgarrett - We were going crazy yesterday because your example worked as planned, where we could not override the text-decoration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment