❔ Is there a way to make this more cleaner?
As you can see, if is not null, I will add a span that will contain that message. I need two <br> tags in case I show the message. One above my span, and the other one above my <table> tag.
Problem is, I feel those if statements I added don't look very clean. What do you think?
33 Replies
I'm sure you can likely simplify the html; that aside razor is never clean beyond a certain point.
how?
I'm seeing it on my phone
Hard to read
Is your question about razor formatting?
Or simplifying html?
my question is about how can i simplify those two razor if statements because the code doesn't look very clean imo
Oops
its okay
Driving
This for instance; looks more like css itching to happen
There's no need for it
Why not have some bottom padding here?
this is why I implement it
with a <br> it looks cleaner
Css can add that white space
which way? i've tried margin-top and bottom and it didnt work for some reason
I'd have to play with it
You might need a display:block on the span
that worked! but only margin-top worked
Try margin: 5m 0 5m 0
like this?
sorry i'm not really good at css
Err
Em
Not m
My bad
5em is probably large
em
nothing and also i get this warning
I tend playaround in the brower using inspect, and find something that works
Did you do 5em?
yeah that seems better than editing the tag in visual studio
it worked but its too big now
Dial it back
Also try rem
it worked
thank you @.mayormccheese !
Css sizes are usually done badly; you can't mix px, em, rem, % unless you know what you're doing
But like @poxy1 said ; use the inspector to find out what works and save it back
yeah will try that from now on
thank you guys
Thank you!!!
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.